Hi,
I try to read from file two lines, and each line is allocated to a QString. I know how read the file line by line but not two lines at the same time.
It's possible?Could you help me?
Many thanks and sorry for my english!
Hi,
I try to read from file two lines, and each line is allocated to a QString. I know how read the file line by line but not two lines at the same time.
It's possible?Could you help me?
Many thanks and sorry for my english!
Hmmm... is this question serious? You know how to read one line but you don't know how to read two lines? Did you try reading one line and then reading another line again? This should give you a total of how many lines read?
I think you have to run a level 3 diagnosticI try to read from file two lines, and each line is allocated to a QString. I know how read the file line by line but not two lines at the same time.
It's possible?Could you help me?
You have to run a level 3 diagnostic.
Ashes to ashes, Qt to Qt ( wysota )
Sorry I think that I don't explain very well.
Imagine that I have a file like this:
2004
2008
2010
2013
....
I read this file line by line. I must do:
read first_line
If first_line > 2005 then
read second_line
if second_line > 2006 then
....
...
Everything it's ok but when I read the second line, when the program goes to the begining, the code reads next line (that is the third line), and I would like that the program reads the second line and so on.
I hope you can understand me :-(
Could you explain what exactly this program is supposed to do?
Maybe it would be better if you read whole file at once like this:
And then you can access each line very easily.Qt Code:
To copy to clipboard, switch view to plain text mode
Anyway I'm not sure what do you want to achieve.
You have to run a level 3 diagnostic.
Ashes to ashes, Qt to Qt ( wysota )
Bookmarks