these 3 are legal
const char * myPtr = "A";
char * const myPtr = "A";
const char * const myPtr = "A";
these 3 are NOT legal
const char * myPtr = 'A';
char * const myPtr = 'A';
const char * const myPtr = 'A';
reason: 'A' is a constant int.
| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | VB Forums | Developer.com |
|
Results 1 to 9 of 9
Threaded View
|
Click Here to Expand Forum to Full Width |