ok,i'm suppose to read all the "CP0X"(where x is a number) from a file and save it into a array.Then read the name(the YYYYY,ZZZZZ,etc) and save each them into array.
Example:
CP01 YYYYY
CP02 ZZZZZ
CP04 WWWW
CP01 RRRRR
CP03 UUUUU
.
.
.
CPO2 TTTTT
So....i did this
for(int i=0;i<10;i++)
{
infile.getline(rarray.module,4);
cout<<rarray.module;
}
where everything listed here are declared properly.It should by right show me something like CP01->rarray[0].module,CP02->rarray[1].module,CP04,CP01,CP03
,where each "CP0X" is stored correctly in rarray.module.BUT it didn't.I want them reading the data downwards then saving the data correctly into the array,not overflowing into the next array for the name.Can someone please help me with this?Thanks:)