AfxMessageBox(("click"));
错误 error C2665: 'AfxMessageBox' : none of the 2 overloads could convert all the argument types
解决方法:
AfxMessageBox(_T("click"));
解释:如果程序中define _UNICODE,则可用_T or _TEXT将后面的内容转为UNICODE格式字符串,否则和不用_T一样
本文介绍了一种常见的C++编程错误“AfxMessageBox: none of the 2 overloads could convert all the argument types”的解决方法。当使用AfxMessageBox函数时,若参数格式不正确会引发此错误。文章详细解释了如何通过添加_T宏来确保字符串被正确转换为Unicode格式,从而避免该错误。
AfxMessageBox(("click"));
错误 error C2665: 'AfxMessageBox' : none of the 2 overloads could convert all the argument types
解决方法:
AfxMessageBox(_T("click"));
解释:如果程序中define _UNICODE,则可用_T or _TEXT将后面的内容转为UNICODE格式字符串,否则和不用_T一样
4082
5万+
7391
3223

被折叠的 条评论
为什么被折叠?
