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: ...
随机推荐
- CPP_const&static
const 1. 定义本地常量,替换宏.#define LENGHTH 16static const int LENGHTH = 16;2. const出现在星号左边,表示被指物是常量:const出现 ...
- CAS (14) —— CAS 更多用户信息
CAS (14) -- CAS 更多用户信息 摘要 将更多用户信息写入到service验证返回消息中 版本 tomcat版本: tomcat-8.0.29 jdk版本: jdk1.8.0_65 cas ...
- windows 中 到底是用的哪个java.exe??? 删除了PATH变量的Java设置还是可以运行java.exe windows/system32
到底是用的哪个java.exe??? 删除了PATH变量的Java设置还是可以运行java.exe JavaWindowsCC++C# 当电脑里面有多个jdk或是jre时,在cmd里面到底是用的哪个 ...
- tabs 标签样式
http://www.jq22.com/jquery-info17973 http://www.jq22.com/demo/elementTab201801262311/ 插件描述:基于element ...
- SpringBoot2 添加应用拦截器
项目参考:详细参见:<Spring Boot 2精髓:从构建小系统到架构分布式大系统> 第三章 3.6.1节 拦截器 MyWebMvcConfigurer package com.arch ...
- Nagios系列1,选择
Zabbix和Nagios哪个更好 zabbix: 1.分布式监控,适合于构建分布式监控系统,具有node,proxy 2种分布式模式 2.自动化功能,自动发现,自动注册主机,自动添加模板,自动添加分 ...
- Android NDK: Application targets deprecated ABI(s): armeabi Open File
Error:(81) Android NDK: Application targets deprecated ABI(s): armeabi Error:(82) Android NDK: Suppo ...
- Python 私有方法和引用计数初讲
#私有方法的定义与调用 class Cat: def __init__(self): self.name = "" self.age = 0 def __changeage(sel ...
- HBase二级索引与Join
转自:http://www.oschina.net/question/12_32573 二级索引与索引Join是Online业务系统要求存储引擎提供的基本特性.RDBMS支持得比较好,NOSQL阵营也 ...
- OSPF建立邻居、邻接关系 学习笔记
Ospf中路由器之间存在两种连接关系:邻居关系和邻接关系.本博文将详细介绍这2种关系建立及工作原理. 如果两台路由器之间共享一条公共数据链路(两台路由器中间没有其它路由器,或者两台路由器之间存在虚连接 ...