Trouble with types...
-
I'm trying to write in a file in my .cpp code: I have a TCHAR variable szText and it should be a string so I could write
fprintf( fichero, "%s\n", szText);
How could I convert my TCHAR in a string? Thank you very much!!!!Hello, http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnarvc/html/msdn\_mbcssg.asp With Regards, R.Selvam
-
I'm trying to write in a file in my .cpp code: I have a TCHAR variable szText and it should be a string so I could write
fprintf( fichero, "%s\n", szText);
How could I convert my TCHAR in a string? Thank you very much!!!!If
szText
is aTCHAR
, the correct syntax would be:fprintf( fichero, "%c\n", szText);
I assume, however, that you meant that
szText
was aTCHAR*
. Correct? If so, yourfprintf()
statement is correct.
A rich person is not the one who has the most, but the one that needs the least.
-
If
szText
is aTCHAR
, the correct syntax would be:fprintf( fichero, "%c\n", szText);
I assume, however, that you meant that
szText
was aTCHAR*
. Correct? If so, yourfprintf()
statement is correct.
A rich person is not the one who has the most, but the one that needs the least.