Quantcast
Channel: Jobs
Viewing all articles
Browse latest Browse all 18427

QFile - Row Count Problem

$
0
0
Hi guys I have datas in txt file. I want to count how many rows are in the txt file. data_num.txt 10   15,2 12,1 42 ...     ... QFile file("datas/data_num.txt"); ... QTextStream in(&file); ... int rowSize; while( !in.atEnd()){         rowSize++;     } When I debuged the program, I guess I got endless loop. Because my program is waiting something and It crash. Why doesn’t the while loop stop?

Viewing all articles
Browse latest Browse all 18427

Trending Articles