Is there any compiler independent and syntactically elegant way to set a vtable pointer in an object allocated with malloc?
Here is a little snippet of code from Wikipedia\'s article on malloc(): int *ptr; ptr = malloc(10 * sizeof (*ptr)); // Without a cast
I\'m having difficulty learning C language\'s malloc and pointer: What I learned so far: Pointer is memory address pointer.
After looking at some open source projects C code I\'m not sure if I\'m doing stuff right. When I\'m creating strings (char *), I\'ve normally done this:
I have a strange error when try to malloc some memory. I\'ve a pointer to a struct which is \"malloced\" and I want another struct. So I call malloc again and the pointer what malloc give back is poin
Let\'s say I have this struct in ANSI C: typedef struct _point { float x; float y; } Point; and this function to create this struct:
I\'m sending a text file - client-server breakup the text into packets each of 512 bytes but some packets contain text less than max size so on the servers side when receiving each packet I\'m calli
I want to build a program which sum a big integers in C. So I\'m ready with the code. The program compiling pass successfully with mingw and Visual C++ compiler. But I have a problem with the run part
My situation is the following: I\'ve implemented a simple RPC system in C through which a client can call a remote function to which it passes a command. The command is executed on the remote machine
I am comparing between different malloc implementations and I would like to compare their run time and memory usage.