Home > Software engineering >  TChar and Char conversion issues
TChar and Char conversion issues

Time:09-26

Help: why can't I have compiled the following code, in the last line prompt identifier "LtmpStr" is undefined.

 int point_num; 
TCHAR szText;
Char tmpStr []={} '\ 0';
Point_num=100;
Sprintf (tmpStr, "% d", point_num);
SzText=_T (tmpStr);

CodePudding user response:

Can't give single character string assignment, szText=(TCHAR) (szTemp [0]).

MFC can use cstrings string class
Int iVal=100;
Cstrings szText;
SzText. The Format (_T (" % d "), iVal);

CodePudding user response:

In addition _T isn't so

CodePudding user response:

建议亲自打开include\tchar.h一眼,

CodePudding user response:

In addition to the above said, I found that you not LtmpStr post code, you may indeed have no definition

CodePudding user response:

reference 4 floor qq_35315154 response:
in addition to the upstairs said, I found that you not LtmpStr post code, you may not define

Are there not _T in
  • Related