In NetBeans go to Tools->Options->C/C++ and tell us what compiler you're using (Tools Collection->C++ Compiler). Also post its version (for g++ it's g++ --version) both on Windows and Linux. Are these different versions? What compiler flags did you use when compiling?
16 Replies - 726 Views - Last Post: 03 November 2012 - 06:37 AM
#16
Re: Problem with writing char array to a textfile
Posted 03 November 2012 - 06:34 AM
#17
Re: Problem with writing char array to a textfile
Posted 03 November 2012 - 06:37 AM
Because the arrays are global, I believe they should by the standard be initialized to 0 by default. I never rely on this, and always initialize character arrays as follows:
which ensures all elements contain the null character.
char myArray[32] = { 0 };
which ensures all elements contain the null character.
|
|

New Topic/Question
Reply





MultiQuote



|