Quote:
Originally Posted by burrobert
It is interesting though that there was no problem on my Macbook Pro both when I compiled and ran the program in xcode and when I did it from the command line. I guess as a general principle though it is better to use a provided initialiser.
|
It could be that a different compiler (clang?) automatically initializes all C variables to 0/NULL, as most other languages do, while gcc doesn't. (When you say command line, do you mean with gcc as opposed to clang?)