Procedure 1
While (file. ReadString (STR))
{
Cstrings line;
Cstrings, line1;
Cstrings line2.
Cstrings line3;
Int iLeft=0;//save the location of the "$"
Int iRight=0;//save the location of the '*'
ILeft=STR. Find (" $");
IRight=STR. Find (" * ");
, line1=STR. Left (iLeft);
Line3=STR. Right (STR) GetLength () - iRight - 1);
Line2=STR. Mid (iLeft + 1, iRight iLeft - 1);
M_aDatas. Add (, line1);
M_aDatas2. Add (line2);
M_aDatas3. Add (line3);
}
Block 2
for(int i=0; i
If (m_iNum - 1!=I)
{
M_tempData. Add (m_aDatas. GetAt (I));
M_tempData2. Add (m_aDatas2. GetAt (I));
M_tempData3. Add (m_aDatas3. GetAt (I));
}
}
M_aDatas. RemoveAll ();
M_aDatas2. RemoveAll ();
M_aDatas3. RemoveAll ();
For (int I=0; i
M_aDatas. Add (m_tempData. GetAt (I));
M_aDatas2. Add (m_tempData2. GetAt (I));
M_aDatas3. Add (m_tempData3. GetAt (I));
}
M_tempData. RemoveAll ();
M_tempData2. RemoveAll ();
M_tempData3. RemoveAll ();
}
M_aDatas m_aDatas2, m_aDatas3 m_tempData, m_tempData2 m_tempData3 undefined and all error
Error 2 error C2228: "Add" to the left of the must have a class/structure/joint
The original program https://wenku.baidu.com/view/784d9f3b844769eae009edd3.html
Hope big directions!!!!!!
CodePudding user response:
The definition of m_aDatas these object types?CodePudding user response:
Should be CArrayCodePudding user response:
M_aDatasM_ module variable
A Array
May be a CStringArray m_aDatas
CodePudding user response: