Posted By: Reconnoiter
quick question about initializing structs - 10/27/15 12:07
Hi,
If I do MY_STRUCT* my_structarray[20]; after setting up MY_STRUCT, will my_structarray[20] be set automatically to NULL?
So the following will not give me memory errors right? (just want to be sure):
It seems like it has been set to NULL here. Cause otherwise I will manually set it to NULL in a for loop.
If I do MY_STRUCT* my_structarray[20]; after setting up MY_STRUCT, will my_structarray[20] be set automatically to NULL?
So the following will not give me memory errors right? (just want to be sure):
Code:
function my_function() { ... if (my_structarray[0] != NULL) { than do blablabla } ... }
It seems like it has been set to NULL here. Cause otherwise I will manually set it to NULL in a for loop.