转自VC错误:http://www.vcerror.com/?p=1395



问题描述:

代码:

CString str("asdfafda");

str.Remove("asd");

编译报错

error C2664: “ATL::CStringT<BaseType,StringTraits>::Remove”: 不能将参数 1 从“const char [4]”转换为“char”

error C2664: “ATL::CStringT<BaseType,StringTraits>::Remove”: 不能将参数 1 从“const char [2]”转换为“char”

解决方法:

详细的解决方法可参考VC错误:http://www.vcerror.com/?p=1395

error C2664: “ATL::CStringT<BaseType,StringTraits>::Remove”: 不能将参数 1 从“const char [2]”转换为“char”的更多相关文章

  1. error: C2664: “zajiao::zajiao(const zajiao &)”: 无法将参数 1 从“const char [12]”转换为“char *”

    原本打算在QT用一个字符串"ABCDEF12345"作为类zajiao的构造函数的参数,用来创建类zajiao的对象zajiao1. zajiao zajiao1("AB ...

  2. VC2010 CString.Format使用报错 error C2664

    error C2664: “void ATL::CStringT<BaseType,StringTraits>::Format(const wchar_t *,...)”: 不能将参数 1 ...

  3. error C2664

    error C2664: “int CWnd::MessageBoxW(LPCTSTR,LPCTSTR,UINT)”: 无法将参数 1 从“const char [19]”转换为“LPCTSTR” n ...

  4. ASSERT报错:error C2664: “AfxAssertFailedLine”: 不能将参数 1 从“TCHAR []”转换为“LPCSTR”

    转载请注明来源:崨雁嫀筝 http://www.cnblogs.com/xuesongshu 这个错误是我在把tinyxml修改为宽字符(Unicode)版本时候遇到的问题,我首先按关键字把所有有ch ...

  5. VS2010 error C2664: “CWnd::MessageBoxW”: 不能将参数 1 从“const char [3]”转换为“LPCTSTR”

    VS2010 (VC2010)建立工程时默认的字符集是Unicode,所以在代码中使用MessageBox时需要输入Unicode,用TEXT()这个宏输入参数,否则会报错:   代码:Message ...

  6. error C2664 转换错误汇总[转]

    vs2005提示 error C2664: “CWnd::MessageBoxW”: 不能将参数 1 从“const char [17]”转换为“LPCTSTR”. 在用vs2005编写mfc程序的时 ...

  7. VS error 全集(error C2664: 'CWnd::MessageBoxW' : cannot convert parameter 1 from 'char *' to 'LPCTSTR'的解决方法)

    我用的是VS2005,在编译MFC时遇到了如下错误: error C2664: 'CWnd::MessageBoxW' : cannot convert parameter 1 from 'char ...

  8. C++ Error C2664:无法将参数 1 从“const char [9]”转换为“LPCWSTR”解决方案

    问题出现 编译平台:VS2013     Windows 出现地方:在使用LoadLibrary( )函数动态链接DLL文件时出现的一个问题 Eg.   在使用 UNICODE字符的工程中,  HIN ...

  9. error C2664: “CWnd::MessageBoxW”: 不能将参数 1 从“const char [17]”转换为“LPCTSTR”

    vs2008提示 error C2664: “CWnd::MessageBoxW”: 不能将参数 1 从“const char [17]”转换为“LPCTSTR” 在外面用vs2005编写mfc程序的 ...

随机推荐

  1. Activation Functions and Their Derivatives

    1. Sigmoid Function: when z=0,g'(z)=0.25 2. tanh Function: when x=0,tanh'(x)=1 3. Relu

  2. Codeforces Round #285 (Div. 2)C. Misha and Forest(拓扑排序)

    传送门 Description Let's define a forest as a non-directed acyclic graph (also without loops and parall ...

  3. Pair Testing

    All-Pairs Testing is a test design method to deal with the combinatorics problem of defining test ca ...

  4. BZOJ 1683.City skyline 城市地平线

    传送门 从左到右扫一遍,考虑什么时候会和之前形成同一幢房子从而不用统计 显然是当前的高度和之前某个点高度相同,并且它们之间没有更矮的建筑 考虑用一个单调栈维护一个单调上升的房子轮廓,然后对于扫到的每一 ...

  5. eclipsePreferences位置

    1.Windows:菜单栏-Window-Preferences 2.Mac:应用顶部最左侧Eclipse-Preferences ---------------------------------- ...

  6. Leetcode Lect3 二分法总结

    二分法模板 非递归版本: public class Solution { /** * @param A an integer array sorted in ascending order * @pa ...

  7. Go语言_并发

    并发 Go 将并发结构作为核心语言的一部分提供.本节课程通过一些示例介绍并展示了它们的用法. Go 作者组编写,Go-zh 小组翻译. https://tour.go-zh.org/concurren ...

  8. NGUI的slider的滑动条制作(SliderScript)

    一,添加一个sprite,给这个sprite添加一个背景如下图: 二,在当前的sprite添加一个子sprite同时给子层添加一个颜色较深的图片,这个子层覆盖当前sprite,我们需要调节子层的dep ...

  9. 安装weblogic中间件_test

    小编对他还不是很了解,等了解的时候小编吧这句话删除(注意) 如果过程中有问题的话请联系 QQ:291562721 weblogic是ORACLE商家,他是一门中间件服务: 因为一些安全的原因,扫描发现 ...

  10. 找回git rebase --skip消失的代码

    1.git reflog操作,查看提交的历史记录,找到自己的提交 2.强制回退到上一次提交:git reset --hard  791a1fc 或者 git reset --hard  HEAD@{2 ...