Home > Software engineering >  MFC program variables.
MFC program variables.

Time:09-21

Online to find a code, to read and write TXT add or delete the last six about class variables don't know how to define, appendix operation complains, the good people to give directions, platform vs2013.

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 CArray

CodePudding user response:

M_aDatas
M_ module variable
A Array
May be a CStringArray m_aDatas

CodePudding user response:

refer to the second floor worldy response:
should be CArray
can I worship you for the teacher

CodePudding user response:

Variables are not statement... Take time to know basic grammar first

CodePudding user response:

See if CStringArray
  • Related