Hi,
I am reading out a text fileusing following lines:
[C++]
ifstream ifs (RECORD_FILE, ifstream::in );
while( getline(ifs,rec ordStr) ) { // while until file is empty
cout << "Read from file: " << recordStr << endl;
recordStrQueue. push(recordStr) ; // push the read line into the queue
}
ifs.close();
[/C++]
Now i would like to delete the line in the file as soon as it's read into
the queue.
How can i delete a line? i probably need to add "ifstream:: out" when
defining my handle. But I didn't find a method to delete a line.
Thanks for your help!
--
chEErs roN
I am reading out a text fileusing following lines:
[C++]
ifstream ifs (RECORD_FILE, ifstream::in );
while( getline(ifs,rec ordStr) ) { // while until file is empty
cout << "Read from file: " << recordStr << endl;
recordStrQueue. push(recordStr) ; // push the read line into the queue
}
ifs.close();
[/C++]
Now i would like to delete the line in the file as soon as it's read into
the queue.
How can i delete a line? i probably need to add "ifstream:: out" when
defining my handle. But I didn't find a method to delete a line.
Thanks for your help!
--
chEErs roN
Comment