Guest User

Untitled

a guest
May 19th, 2015
509
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <QtCore>
  2.  
  3. int main(int argc, char **argv)
  4. {
  5.     if (argc < 2)
  6.         return 1;
  7.     QFile file(QString::fromLocal8Bit(argv[1]));
  8.     if (!file.open(QFile::ReadOnly))
  9.         return 2;
  10.     QRegExp rx("^Точка: (.*)$");
  11.     QTextStream in(&file);
  12.     while (!in.atEnd()) {
  13.         if (rx.indexIn(in.readLine()) >= 0)
  14.             qDebug() << rx.cap(1);
  15.     }
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment