Hi All,
I am trying to convert LPTSTR to char* by using sprintf,
But sprintf copies only the first character from the string. i tried both array and pointer also , but the result is same. Here is my code...
LPTSTR TestStr= _T("Test String");
char s1[1000];
char *s2;
s2 = (char *) malloc(1000*sizeof(char));
sprintf(s1,"%s",TestStr);
sprintf(s2,"%s",TestStr);
Both s1 and s2 stores only 'T'.
Kindly help me in this regard...
Thanks for your time...
Regards
PSKumaran.