Sign in to follow this  

wcstombs unresponsive

Recommended Posts

Hi: I am converting my std::wstrings to char*s like this: char* tempChar = NULL; const wchar_t* tempConstWide = g_IP.c_str(); wcstombs( tempChar, tempConstWide, 16 ); GetHost( tempChar, g_PORT ); where g_IP is a std::wstring, like "" The const wchar_t* tempConstWide = g_IP.c_str(); line works, but tempChar remains a NULL pointer after the wcstombs function. I have included stdlib.h.... Any ideas why this might be? Thanks Si

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this