i know how to read entire lines, but how do i read multiple lines?
i currently use
how would i read all lines in the file?Code:read_file.getline(buffer,100);
Printable View
i know how to read entire lines, but how do i read multiple lines?
i currently use
how would i read all lines in the file?Code:read_file.getline(buffer,100);
put that code in a loop
Code:while( read_file.getline(buffer,100) )
{
// do something such as copy the line someplace else
// if you want to keep it.
}
Code:read_file.getline(buffer,100);
read_file.getline(buffer,100);
read_file.getline(buffer,100);
read_file.getline(buffer,100);
read_file.getline(buffer,100);
hey dragon, would that code keep reading till end of file?
yes. Search this board because it has been explained (to me too) several times.Quote:
Originally Posted by rodrigorules