I seem to remember seeing somewhere that you cannot allocate memory for a pointer that is already set to NULL. Is this true?
Huh? If what you mean by this is:
Code:
int *ptr = NULL;
ptr = malloc(...);
would be wrong, then you have misunderstood. This code-snippet is perfectly valid and correct.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.