ramin.lich
29th September 2014, 20:57
hi all
this is my prog
QCoreApplication a(argc, argv);
QString path("e:\\digi.txt");
QFileInfo info(path);
int x;
int *b;
b=new int;
QFile ready(path);
ready.open(QIODevice::ReadOnly);
QTextStream point(&ready);
while(!ready.atEnd()){
point>>x;
}
ready.close();
int k;
k=info.size();
qDebug()<<x;
now this code wont print latest data in the text file but will print the first data in the text file why?
thanks
this is my prog
QCoreApplication a(argc, argv);
QString path("e:\\digi.txt");
QFileInfo info(path);
int x;
int *b;
b=new int;
QFile ready(path);
ready.open(QIODevice::ReadOnly);
QTextStream point(&ready);
while(!ready.atEnd()){
point>>x;
}
ready.close();
int k;
k=info.size();
qDebug()<<x;
now this code wont print latest data in the text file but will print the first data in the text file why?
thanks