How can I convert a wchar_t * to char *? My code is something like that but it just get the first character:

wchar_t * filename= L"C:\\test";
char* c = (char*)filename ;