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

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

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

yes but hi steal give me ERROR

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*.

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

See this link. Scroll down a bit to the section "Converting from wchar_t * Example"

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

Ancient Dragon tks lot for you help

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.