在开发中将一个字符串分割,并将子字符串保存在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. php设计模式总结-单件模式

    一.单件模式 英文叫做sington.其他语言中有叫做单例模式,其实都是一样的道理.保证只会出现单个实例,所以是单例.翻译成单件,永远只会产生一件,呵呵. 还有翻译成单元素模式.其实关键是看这个英文比 ...

  2. python 普通方法,@classmethod,@staticmethod

    普通方法 实例化一个类,然后通过类的实例化去调用方法: class method1: def __init__(self): self.items = [1,2,3,] def getvalue(se ...

  3. spring 加载jar包中的配置文件

    package com.xxx.ssptsppt.dataexchange.utils; import com.xxx.maybee.engine.utils.FileUtil; import com ...

  4. Centos 安装jdk jre

    下载rpm http://www.oracle.com/technetwork/cn/java/javase/downloads/jdk7-downloads-1880260.html wget ht ...

  5. Java设计模式(3)建造者模式(Builder模式)

    Builder模式定义:将一个复杂对象的构建与它的表示分离,使得同样的构建过程可以创建不同的表示. Builder模式是一步一步创建一个复杂的对象,它允许用户可以只通过指定复杂对象的类型和内容就可以构 ...

  6. SparkR(R on Spark)编程指南 含 dataframe操作

    SparkR(R on Spark)编程指南 Spark  2015-06-09 28155  1评论 下载为PDF    为什么不允许复制 关注iteblog_hadoop公众号,并在这里评论区留言 ...

  7. Python 字符串操作函数一

    #-*- coding:utf-8 -*- strword = "i will fly with you , fly on the sky ." #find print(strwo ...

  8. WPF中ComboBox使用

    1.数据绑定 前台代码: <ComboBox Height="23" HorizontalAlignment="Left" Margin="86 ...

  9. backup & restore On Ubuntu

    详见:https://help.ubuntu.com/community/BackupYourSystem/TAR 在 使用Ubuntu之前,相信很多人都有过使用Windows系统的经历.如果你备份过 ...

  10. reduce内置高阶函数求和

    >>> def f(x, y): ... return x+y ... >>> reduce(f, a, ) >>> reduce(lambda ...