[edit]codice:char c; ifstream is; is.open("mio_file") unsigned int i = 0; while ( is.good() ) { is.seekg ( i, ios::end ); c = is.get(); if ( is.good() && c == '\n' ) break; i--; } .....
is.seekg ( -i, ios::end );
[edit]
[edit]codice:char c; ifstream is; is.open("mio_file") unsigned int i = 0; while ( is.good() ) { is.seekg ( i, ios::end ); c = is.get(); if ( is.good() && c == '\n' ) break; i--; } .....
is.seekg ( -i, ios::end );
[edit]