I\'ve been working on this program for five months now. Its a real time application of a sensor network. I create several linked lists during the life of the program and Im using malloc for creating a
I开发者_JAVA技巧s it the correct way of allocating memory to a char*. char* sides =\"5\"; char* tempSides;
I\'m trying to allocate memory for a multidimensional array (8 rows, 3 columns). Here\'s the code for the allocation (I\'m sure the error is clear for you)
I\'m studying for a final exam and I stumbled upon a curious question that was part of the exam our teacher gave last year to some poor souls. The question goes something like this:
I\'m fixing a program but I\'m facing a problem and I cant really realize what\'s the wrong on the code. I would appreciate any help.
I\'v followed a tutorial to use OGL tesselaton. In one of the callbacks there is a malloc and it creates a leak every time I render a new frame.
further developing the code from yesterday (seg fault caused by malloc and sscanf in a function), I tried with the help of some tutorials I found on the net to generate a 2-dim vla. But I get a segmen
this doesn\'t work: void function(char* var) { var = (char*) malloc (100); } int main() { char* str; function(str);
I want to open a text file (see below), read the first int in every line and store it in an array, but I get an segmentation fault. I got rid of all gcc warnings, I read through several tutorials I fo
i got a crazy error within that for-loop matr=realloc(matr, newmax*sizeof(matr*)); for (i=0; i<newmax; i++){