I'm trying to run this code:
string p = "Test.txt";
ifstream fid(p.c_str());
while(!fid.eof()) {
getline(fid,p);
cout << "|s|" << p << "|e|" << endl;
}
But the result put's somehow of since it is like this:
|e|line1
|e|line2
...
instead of:
|s|line1|e|
|s|line1|e|
...
Could somebody please explain to me what I'm doing wrong?
yours magu_