Ah ok, I understand. That seems like a good way to use malloc then if it's gonna help eliminate bugs when programs get more complicated and I (more than likely :p)forget to change the malloc!
...
Type: Posts; User: lydiab
Ah ok, I understand. That seems like a good way to use malloc then if it's gonna help eliminate bugs when programs get more complicated and I (more than likely :p)forget to change the malloc!
...
What's the difference between :
node* n = malloc(sizeof(node));
and
node* n = malloc(sizeof(*n));[/QUOTE]
The first one is creating a chunk of memory the size of a node (is that right?)...
I'm finding dev c++ to be a bit of a nightmare. Any code that works error free on the college unix computers always brings up errors in dev c++ or, like in this case, doesn't run properly. I have a...
Thanks for your reply. I've still no idea why it won't run properly on my computer. The printTree function also causes it to crash after it outputs one or two numbers. very strange!
Hadn't...
oops, sorry about the identation! i'm usually the only one who has to read my code so I just stick with the identation dev c++ gives me!
Well it's still not working for me. No idea what the...
Hi there,
I'm having a problem with my bst and I can't work out why. I've looked through so many pages of code but can't find a similar problem.
In my program, I originally got it to read a file...