CStringArray error C2248: 'CObject::CObject' : cannot access private member declared in class
在开发中将一个字符串分割,并将子字符串保存在CStringArray中,专门写了一个函数,如下:
SplitStringToCString(CString str, TCHAR tszSplit, CStringArray cstrArray);
然而在调用的时候老是报错:CStringArray error C2248: 'CObject::CObject' : cannot access private member declared in class

出现上述错误的原因是:CStringArray 不能被赋值构造函数调用。
解决方法:传引用进去
SplitStringToCString(CString str, TCHAR tszSplit, CStringArray& cstrArray);
CStringArray error C2248: 'CObject::CObject' : cannot access private member declared in class的更多相关文章
- error C2248: 'MyString::pCharArray' : cannot access private member declared in class 'MyString'
std::ostream & operator<<(std::ostream os,const MyString & mystr){os<<mystr.pCha ...
- error C2248: 'QObject::QObject' : cannot access private member declared in class 'QObject'
1.error C2471: cannot update program database vc90.pdb 解决方案:https://blog.csdn.net/shuixin536/article ...
- [置顶] c++,vc6.0,中友元函数,无法访问私有字段(private)的问题(problem),cannot access private member declared in class 'Date'
c++,vc6.0,中友元函数,无法访问私有字段(private)的问题(problem),cannot access private member declared in class 'Date' ...
- error C2248: “CObject::operator =”: 不可访问 private 员(于“CObject”类声明)
MFC如果编码错误: 演出:error C2248: "CObject::operator =": 不可访问 private 员(于"CObject"类声明) ...
- “CObject::operator =”: 无法访问 private 成员(在“CObject”类中声明)
c++工程编译报错: “CObject::operator =”: 无法访问 private 成员(在“CObject”类中声明) 错误无法直接定位源码位置,网上搜索了,也和我的代码不一样. 最后还是 ...
- docker postgresql FATAL: could not access private key file "/etc/ssl/private/ssl-cert-snakeoil.key": Permission denied
在docker中启动postgresql时出现错误 FATAL: could not access private key file "/etc/ssl/private/ssl-cert- ...
- java.lang.IllegalAccessException: Class XX can not access a member of class XXX with modifiers "private static"
当前需求: 利用反射获取某一属性值运行结果:java.lang.IllegalAccessException: Class com.example.demo.test.Reflect can not ...
- PMD - Avoid autogenerated methods to access private fields and methods of inner / outer classes
PMD错误 Avoid autogenerated methods to access private fields and methods of inner / outer classes 样例 p ...
- Class org.apache.struts2.json.JSONWriter can not access a member of class org.springframework.aop.TruePointcut with modifiers "public"
Spring注入Action使用Json错误:org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException: ...
随机推荐
- NSDateFormater格式化参数汇总
NSDateFormatterhtml, body {overflow-x: initial !important;}html { font-size: 14px; } body { margin: ...
- 俞军的PM12条
俞军的PM12条:1.PM首先是用户2.站在用户角度看待问题3.用户体验是一个完整的过程4.追求效果,不做没用的东西5.发现需求,而不是创造需求6.决定不做什么,往往比决定做什么更重要7.用户是很难 ...
- jquery.nestable.min.js可拖动标签
主容器为一个叫div的classname为dd的东西. 只要对这个主容器进行捕获加上一个方法 nestable就可以了. 可以给的属性为 serialize 直接以字符串的形式给入,意思就是按 ...
- 使用 js替换网页中的关键词为链接
要求把一段html脚本中的疾病名添加到疾病库的链接,只添加一次,要避开超链接或图片链接. 最初是用的 str.replace('糖尿病', '<a href=...>糖尿病</ ...
- 利用altium怎么生成PDF及怎么1:1打印文档
画完板子之后,还要生成原理图PDF文档,供其他设计人员参考和指正. 上图红框标注的两个地方,分别用于打印预览设置和生成原理图PDF.那么若是生成原理图PDF文档,则选择smart PDF即可. 点击s ...
- hashMap 根据已有知识知道的
public V put(K key, V value) { //假如table为空 if (table == EMPTY_TABLE) { inflateTable(threshold); } // ...
- 关于Unity中如何立即中断动画然后重新开始播放
今天做一个FPS游戏的时候,用的是新版的动画系统,遇到一个问题. 就是用枪打敌人的时候,敌人会播放一个被击中的动画,但是如果在动画播放的过程中再射击敌人,敌人会先把第一个被击中的动画播放完,才再播放第 ...
- SEMI-PARAMETRIC TOPOLOGICAL MEMORY FOR NAVIGATION
github: https://github.com/nsavinov/SPTM
- js dom添加回车事件
<!DOCTYPE html> <html lang="en" class="no-js"> <head> <meta ...
- c算法
斐波那契 void main() { ]={, }, i; ;i<=;i++) //这里需要注意,for循环虽然<=9, 还有个i++ { a[i] = a[i-] + a[i-]; pr ...