Is there a way to move the position without reading the line? I want to just read the first char on the line, and if it is not the one i want it moves onto the next line.
1 2 3 4 5 6 7 8
if ( (char)fgetc( file ) == ';' )
{
//move to next line
}
else
{
//other code...
}
If you want to do it using Windows-Only code, you will just have to keep reading in bytes until you read \n - which is a bit more than just one line of code.
I just have one more question. When I call ifstream->close() after using the ignore(), does that remove the line from the file or does it just ignore it when it is reading it?