Hi All,

have a text file in the format
#n X Y Z
0 123 456 789
1 321 654 987
2 345 243 809
......
.....
...... and so on
i have implemented the code which reads the contents of file and display in the console along with the line numbers, here is my code

QStringList lines;
QString result;
QFile file( "datum.txt" );
if ( file.open( IO_ReadWrite ) ) {
QTextStream stream( &file );
QString line;
linenumber = 0;
while ( !stream.atEnd() ) {
line = stream.readLine( );
printf( "%3d: %s\n", linenumber++, line.latin1() );
lines +=line;
}
file.close();
}

now how read the particular line number in a text file(say line number 3) and its contents.please help us it would be a great pleasure.