cout <(LPCTSTR) A;
The output of A why not ABC but A string of 00 f61898
Is there a way to make the output character of ABC
CodePudding user response:
cout < (LPCTSTR) A;//red gild the lily, to join the red, turned into A pointer, the pointer is as numerical processingCodePudding user response:
cout <(LPCTSTR) A;Change
AfxDump & lt;
Int main ()
{
CStringA A (" ABC ");
cout return 0;
}
Or
Int main ()
{
Cstrings A (" ABC ");
cout <(CStringA) A;
return 0;
}