getline function is being weird
Code:
char dataIn[80];
char m[30] = "222222"
char cS[30] = "CCCC"
while (!ins.eof()){
ins.getline(dataIn, '\n');
outs << m + cS + dataIn << endl;
}
the problem is it only inserts the dataIn once, i get the m, and cS every line, but the dataIn only outputs once.
the output looks something like this
Code:
222222CCCC
222222CCCC4444444444444444444444444
222222CCCC
222222CCCC
222222CCCC
.
.
.
// 2 is m
// C is cS <--- actual data is a variety of letters and numbers
// 4 is dataIn
im almost 100% sure that it is because i am using getline wrong, but i dont know how i am using it wrong... im really stuck on this one.