谢谢
------解决方案--------------------
可以直接转: char* p = (char*)(const char*)str;
------解决方案--------------------
可以使用函数:wcstombs() ,完成转换。
------解决方案--------------------
MSDN:
wcstombs
Converts a sequence of wide characters to a corresponding sequence of multibyte characters.
Parameters
mbstr
The address of a sequence of multibyte characters
wcstr
The address of a sequence of wide characters
count
The maximum number of bytes that can be stored in the multibyte output string
Return Value
If wcstombs successfully converts the multibyte string, it returns the number of bytes written into the multibyte output string, excluding the terminating NULL (if any). If the mbstr argument is NULL, wcstombs returns the required size of the destination string. In versions of Windows CE prior to 3.0, setting mbstr to NULL returns -1. If wcstombs encounters a wide character it cannot be convert to a multibyte character, it returns –1 cast to type size_t.