Or does that automatically do that when I allocate memory to the nodeList[5].
No, you need to do that.
[edit]
Except that this won't go far:
sizeof(void) -- you need a type to have a size of that type.
[/edit]
Why the casts on
malloc? If you're using C++, why not
new or a
vector? If C, stop doing that and let your compiler help you write better code.
Reputation Points: 2780
Solved Threads: 312
long time no c
Offline 4,790 posts
since Apr 2004