0
char *CHuser, *CHpass;
	CHuser = user_user.GetBuffer(0); //user_user its CString verb
	CHpass = password_user.GetBuffer(0); // password_user its CString verb

i need to convert the CString to char but is not woking if someone can help me its gon be very useful
ks
biny

2
Contributors
8
Replies
9
Views
6 Years
Discussion Span
Last Post by l1nuxuser
0

lot tks
but i can understand how to convert to a` normal CHAR
tks

0

LPTSTR is defined by Microsoft as char* or wchar_t* depending on whether you compile for UNICODE or not.

Edited by Ancient Dragon: n/a

0

What is the error? Are you compiling for UNICODE or not? If UNICODE you can't just simply typecast CString.GetBuffer() into a char* because GetBuffer() will return wchar_t*, not char*. You will have to use one of the string conversion functions to convert it from wchar_t* to char*.

0

yes tnks for quick ansewr
i am using unicode can you tell me some fonction to convert into unicode + exmpale

0

it dont slove it becouse is not convert it but close it i gon try anthoer way

Ancient Dragon tks lot for you help

Edited by l1nuxuser: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.