在开发中将一个字符串分割,并将子字符串保存在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的更多相关文章

  1. error C2248: 'MyString::pCharArray' : cannot access private member declared in class 'MyString'

    std::ostream & operator<<(std::ostream os,const MyString & mystr){os<<mystr.pCha ...

  2. 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 ...

  3. [置顶] 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' ...

  4. error C2248: “CObject::operator =”: 不可访问 private 员(于“CObject”类声明)

    MFC如果编码错误: 演出:error C2248: "CObject::operator =": 不可访问 private 员(于"CObject"类声明) ...

  5. “CObject::operator =”: 无法访问 private 成员(在“CObject”类中声明)

    c++工程编译报错: “CObject::operator =”: 无法访问 private 成员(在“CObject”类中声明) 错误无法直接定位源码位置,网上搜索了,也和我的代码不一样. 最后还是 ...

  6. 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- ...

  7. 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 ...

  8. 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 ...

  9. 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: ...

随机推荐

  1. Java中Connection方法笔记

    http://www.apihome.cn/api/java/Connection.html public interface Connectionextends Wrapper 与特定数据库的连接( ...

  2. Java并发编程:并发容器之CopyOnWriteArrayList<转>

    原文链接: http://ifeve.com/java-copy-on-write/ Copy-On-Write简称COW,是一种用于程序设计中的优化策略.其基本思路是,从一开始大家都在共享同一个内容 ...

  3. AndroidA——背景选择器selector用法汇总(一)

    一.创建xml文件,位置:drawable/xxx.xml,同目录下记得要放相关图片 <?xml version="1.0" encoding="utf-8&quo ...

  4. 在Word 2007中添加参考文献及其引用的方法

    以前写文章的时候忽略了在文章中添加参考文献及其引用的方式,文章各式显得不太正式,在网上进行了相关搜索,将方法整理如下: 1.将光标停留在需要插入文献的地方[1],选择菜单栏上的"引用 -&g ...

  5. Hibernate 查询说明

    1.Criteria setFetchSize实际上与分页操作并没有关系,它的作用是在查询中进行分批数据返回,其中的值就是每次分批查询的记录数,主要是为了提高查询性能的. 举个例子来说:如果你这次查询 ...

  6. 读取 classes下的配置文件

    调用: Configure.getValue("discount.strategy.class"); 配置类: package com.util; import com.sun.j ...

  7. javascript 获取当前部署项目路径

    javascript 获取当前部署项目路径 ========================================= javascript获取当前部署项目路径: 主要用到Location 对 ...

  8. substance新版及问题

    新版地址:https://github.com/Insubstantial,目前是7.3版 http://stackoverflow.com/questions/3657538/substance-u ...

  9. 12 extremely useful hacks for JavaScript

    In this post I will share 12 extremely useful hacks for JavaScript. These hacks reduce the code and ...

  10. android设置GridView高度自适应,实现全屏铺满效果

    使GridView每个item的高度自适应拉伸,达到整个GridView刚好铺满全屏的效果. public static void setGridViewMatchParent(GridView gr ...