Hello. I want to copy the last 4 bytes from a specific line from a text file (ie, always line 5). What is the best method to use once I open the file for reading. ie, How do I jump to line 5, then copy the last 4 bytes.
size_t n = 5;
while ( n && std::getline( YourFileStream, line ) ) --n;
if ( n == 0 )
line.assign( line, line.size() < 4 ? 0 : line.size() - 4, std::string::npos );
// other stuff with line