I want to read the exact below line from text file by using ifstream associated with getline function
KM78457 , C1 , Testing , ZMY290HR6UP-B ,GHTTTTTTT , 0.1268 , 32 , 4.06 ,
But It should be able to read in start from " , C1 , Testing , ZMY290HR6UP-B ,GHTTTTTTT , 0.1268 , 32 , 4.06 ," therefore there is still missing because all failed to capture the words "KM78457" at the most front line.
std::ifstream fi;
std::string streamline;
fi.open("C:/exp_test.txt",std::ios::in );
while (!fi.eof())
{
fi.clear();
fi.seekg(0,std::ios::cur);
fi >> newline;
std::getline(fi,streamline);
std::cout << streamline ;
}
Can anyone give me a help, Thanks.