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);
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);
lu lu lu I've got some apples lu lu lu You've got some too lu lu lu Let's make some applesauce Take off our clothes and lu lu lu
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.Originally Posted by rodrigorules