
11 May
2005
11 May
'05
5:02 p.m.
Pavol Droba wrote:
And correct me if I'm wrong, but from the C++ programmer perspecive, char[] is in 90% cases used as a string literal.
This has not been my experience. char[] is usually a char[] in my code, a character buffer with a fixed size, as I tried to show with the swprintf example. (Sometimes it's a short array of characters, typically 4, but this is rare.) String literals typically decay to char const* the moment they are used. Of course my experience may be unusual.