Hi,
After coming across some dubiously safe code I've been scanning the C++ standard but cannot find any definitive reference to what the value of an uninitialised char[N] will be. Is it undefined?
I can see that with gcc 4.6 at least [0] is initialised as unsigned(0) - which leaves methods like strcat safe to use immediately... but if it is undefined then the code works only by fluke of the compiler implementation detail.
Cheers,



LinkBack URL
About LinkBacks


