首页 > TAG信息列表 > wcscpy
C/C++ 如何拷贝一个wchar_t类型的字符串
1 Do this, 2 3 wchar_t clone[260]; 4 5 wcscpy(clone,szPath); 6 7 Or, if you want to allocate memory yourself, 8 9 wchar_t *clone = new wchar_t[wcslen(szPath)+1]; 10 11 wcscpy(clone,szPath); 12 13 //use it 14 15 delete []clone; 16 17 Check