在线求帮助cannot convert parameter 6 from 'unsigned short [1

C++语言 码拜 8年前 (2016-04-24) 744次浏览
  hFileMapping = CreateFileMapping(INVALID_HANDLE_VALUE, 
    NULL, 
    PAGE_READWRITE, 
    0, 
    1024*1024, 
    L"ShareMemoryTest");//这里出错了
//出错提示如下:cannot convert parameter 6 from "unsigned short [16]" to "const char *"

该怎么弄  求帮助

解决方案

40

试试”ShareMemoryTest”或_T(“ShareMemoryTest”)

40

也就是说你的是多字节下的,另一个修改办法可以不用要字符串前面的 L

CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明在线求帮助cannot convert parameter 6 from 'unsigned short [1
喜欢 (0)
[1034331897@qq.com]
分享 (0)