pavel
It's just alias
Alireza
Leovan
Anyone know how to debug executable which compiled by msvc (Microsoft compiler) using gdb? Msvc store debugging symbols in sepatare .pdb file only and gdb can't parse them.
习近平我肏你妈
I don't think gcc can recognize debug symbols made by msvc. Gcc is not responsible for doing so.
Michael
Ok
Pablo
Guys
Pablo
Have you ever used the gstreamer library?
Anonymous
does any one know certification program for c ? instructor led? paid?
Buffer
#include<stdio.h>
int main(int argc, char *argv[])
{
int j=0,i=0,count=6;
switch(3)
{
case 0:
while(--count>0)
{
case 1: ++j;
case 2: ++i;
case 3: ;
case 4: ;
case 5: ;
}
}
printf("%d\t %d",i,j);
return 0;
}
Buffer
Buffer
Help me!
Jerry
HIRO
Pavel
Anonymous
Does anyone suggest me good Data structures course in c++
Alireza
HMODULE GCM()
{
HMODULE hModule = NULL;
GetModuleHandleEx(
GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS,
LPCTSTR(GCM),
&hModule);
return hModule;
}
Alireza
Faramarz
treeNameNode* DeleteName(treeNameNode* root, char data[]) {
if (root == NULL) {
return NULL;
}
if (strcmp(data, root->treeName) < 0) { // data is in the left sub tree.
root->left = DeleteName(root->left, data);
} else if (strcmp(data, root->treeName) > 0) { // data is in the right sub tree.
root->right = DeleteName(root->right, data);
} else {
// case 1: no children
if (root->left == NULL && root->right == NULL) {
free(root); // wipe out the memory, in C, use free function
root = NULL;
}
// case 2: one child (right)
else if (root->left == NULL) {
treeNameNode* temp = root; // save current node as a backup
root = root->right;
free(temp);//delete
}
// case 3: one child (left)
else if (root->right == NULL) {
treeNameNode* temp = root; // save current node as a backup
root = root->left;
free(temp);
}
// case 4: two children
else {
treeNameNode* temp = minValName(root->right); // find minimal value of right sub tree
strcpy(root->treeName, temp->treeName); // duplicate the node
//root->count = temp->count;
root->right = DeleteName(root->right, temp->treeName); // delete the duplicate node
}
}
return root; // parent node can update reference
}
void freeAll(treeNameNode* root) {
if(root == NULL)
return;
freeAll(root->left);
freeAll(root->right);
free(root);
}
Hi everyone,
I have two function for binary search tree that one of them is supposed to delete one node from the tree and another one is supposed to free up the memory. When ever I use deleting function and the freeAll function I get a warning for double free, could you help me to solve this issue?
B;
How am I supposed to send my code here . It keeps getting deleted
B;
It says it contains external links
B;
// dynamic constructor
#include <stdio.h>
#include <conio.h>
#include <iostream>
using namespace std;
class dynamic const
{
char *name;
int size;
public:
dynamic const()
{
name = NULL;
size = 0;
}
dynamic const(char *s)
{
size = strlen(s);
name = new char(size) + 1;
strcpy = (name, s);
}
void showdata()
{
cout << "name = " << name;
cout << "size =" << size;
}
dynamic concat(dynamic const s2)
{
dynamic const temp;
temp.size = size + s2.size;
temp . name + new char(temp.size) + 1;
strcpy(temp . name);
strcat(temp . name, s2 . name);
return (temp);
}
};
void main()
{
dynamic const s1("axxxan");
dynamic const s2("computer");
dynamic const s3();
s1.showdata();
s2.showdata();
s3 = s1.concat(s2);
cout << "the concated objs are: ";
s3.showdata();
getch();
}
B;
Error: expected unqualified id before '{' token.
Saro
B;
Saro
B;
7:1
Saro
Saro
cosnt have to be before class keyword
B;
Saro
Sorry?
Instead of “class dynamic const” you should write “const dynamic class“
Ludovic 'Archivist'
Only const methods can be called with a const reference to the object
Ludovic 'Archivist'
Const enables reordering based optimizations
Saro
B;
https://pastebin.com/cqYKzS83
Check this one
Saro
Ster-Devs
Joaquin
I am looking for a software to evaluate the metrics of my programs, does anyone know any?
Shutz
Hello
Dima
Hello
what is difference between a reference and pointer?
Shutz
Am here to learn bro
Shutz
😁
Saro
Dima
bruh I was just checking if it isn’t a spambot
Saro
Pablo
Buffer
Pablo
$ gcc $(pkg-config --cflags gtk+-3.0) -o hello-world-gtk hello-world-gtk.c $(pkg-config --libs gtk+-3.0)
hello-world-gtk.c: In function 'activate':
hello-world-gtk.c:23:3: warning: implicit declaration of function 'gtk_window_set_child'; did you mean 'gtk_window_set_role'? [-Wimplicit-function-declaration]
23 | gtk_window_set_child (GTK_WINDOW (window), button);
| ^~~~~~~~~~~~~~~~~~~~
| gtk_window_set_role
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:\msys64\tmp\ccRFxdbn.o:hello-world-gt:(.text+0xf6): undefined reference to `gtk_window_set_child'
collect2.exe: error: ld returned 1 exit status
Pablo
what am I doing wrong?
Pablo
I'm trying to compile a simple gtk program
Daulet
Pablo
Pablo
Pablo
I think
pavel
What century now? Why we still using gtk?
Daulet
pavel
I don't see a reasons to use gtk when qt available
Alireza
who knows about aspose word cpp?
Евгений
:V but it doesn't work with C
It works with C++, and only C++. It also supports garbage python but with python it still work badly, because it's python.
pavel
Pablo
alright
Pablo
:(
pavel
Starting new projects on C is a crime
pavel
Problem is people use what they know. After education students will famous with C, so much probably will use in work and software what they will develop will suffer from C problems
pavel
We already have tons of legacy code, and community should move forward
Pavel
I don't think someone will allow junior devs to write something in the language they want (can be, but unlikely), the problem is mostly when people write C++ code as if it's C.
So you there's a need to unlearn some C stuff later if going to C++. However today one can go to Rust from C instead.
Pablo
I managed to fix the bug
Pablo
hey
Daulet
Good
Pablo
my program only works when it's in the same directory of the dll files it needs
Daulet
Daulet