Read from memory
-
Hi all,
I got a quick question, i am reading a txt file line by line and comparing the values like following
@ QFile file("read.txt");
if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
return;
int data,min[5],max[5];
int row,column;
float result1[5],cotdr_out[5];
for (row = 0; row < 4; row++){
QByteArray line = file.readLine();
QList<QByteArray> numbers = line.split(',');
for (column = 0; column < (numbers.size() - 1); column++) {
data = numbers[column].toInt();
if (data > max[column])
max[column] = data;
}
}@
Now my Question is, instead of reading from a txt file, I need to read from memory, how can i proceed further.
what i need to do instead of QFile file read..an example would be good
Thanks
qxoz: for future, please enclose your code in "@" for syntax highlighting
-
"This thread sir may help you":http://qt-project.org/forums/viewthread/7190