c++ - Reading text file in Qt -
i want read huge text file in dividing strings according comma (,) , store strings in array. how this. there class action stringtokenizer in badaos. have tried qfile not able read whole file.
qtextstream lets read line line
qfile file(hugefile); qstringlist strings; if (file.open(qiodevice::readonly | qiodevice::text)) { qtextstream in(&file); while (!in.atend()) { strings += in.readline().split(";"); } }
Comments
Post a Comment