我使用Microsoft Visual Studio 2010创建了一个DLL,一切正常; 现在我想将一个成员变量添加到我导出的类中; 这个成员变量是struct的向量,它包含另一个结构的CArray.我在调试模式下遇到的错误是
Run Code Online (Sandbox Code Playgroud)error C2248: 'CObject::CObject': cannot access private member declared in class 'CObject' c:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxtempl.h 262
我知道我收到此错误,因为包含CArray的结构的构造函数存在问题,但我无法修复它.请帮我.下面我发布了代码.
出口类别:
namespace optFun
{
// si posso definire altri casi in base a dove vengono collocati gli strumenti di gestione delle eccezioni
enum RETURN{
RETURN_INIT=0,
RETURN_ERRORINREADING,
RETURN_ERRORINPARALLEL,
RETURN_ERRORINMAKESPAN,
RETURN_SUCCESSFUL
};
struct DataPrescription{
EDrug NameDrug;
float Dosage;
EContainerType DestType;
ELiquid IdDest;
float CapacityDest;
float Priority;
bool ScaricoShaker;
int BlockNumber;
DataPrescription(){
NameDrug=EDrug_NoDrug;
Dosage=0.0;
DestType= EContainerType_Tot;
IdDest=ELiquid_NoLiquid;
CapacityDest=0.0; …Run Code Online (Sandbox Code Playgroud)