-
August 25th, 2000, 03:13 AM
#1
Convert TCHAR to CString
I have a TCHAR and I would like to convert them into CString. I tried to use class member CString but that's can't work also..what shall I do..?
int max, i;
TCHAR ch[max];//read from text file
CString mystr, mstr;
for (i=0; i<max; i++)
{ CString mystr(ch[i], 1);
mstr += mystr;
}
cout <<mstr <<endl;
I think it's only an easy question...so there will be an answer to help me..:]
-
August 25th, 2000, 03:35 AM
#2
Re: Convert TCHAR to CString
I'm korean. So i can't speak english very well..^^
try like that!
CString temp;
char * temp1= "Test";
temp = temp1;
Regards....
-
August 25th, 2000, 03:48 AM
#3
Re: Convert TCHAR to CString
hi
after u read "ch" from file u can directly assign it to CString.
Ex:
TCHAR ch[10]="Some Text From File";
CString str=ch;
Regards
SKP
Be sure to rate answers if it helped, to encourage them.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|