P
Peter Nilsson
Henryk wrote:
[> > > char pippo [2] = "AE"; ]
Obviously.
In C++, the array must be big enough to house the entire string
literal, including the terminating null byte. C makes an explicit
concession that the null byte (alone) may be ignored in such
initialisations.
Consider it a lesson that C is not C++.
[> > > char pippo [2] = "AE"; ]
I compiled it as C++. Is there a difference between C and C++ that I am
not aware of?
Obviously.
In C++, the array must be big enough to house the entire string
literal, including the terminating null byte. C makes an explicit
concession that the null byte (alone) may be ignored in such
initialisations.
Consider it a lesson that C is not C++.