1

I want to find alternative for cin >>

#include <QDebug>
#include <QTextStream>
#include <QString>

int main(){
    qDebug() << "Test start";
    QTextStream in(stdin);
    QString qstr;
    qstr = in.readLine();
    qDebug() << "Test end";
}

Also I tried

in >> qstr;

But nothing changed. Console:

enter image description here

So, I input for infinitive and "Test End" isn't coming, help me please guys!

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
sardorkun
  • 87
  • 2
  • 11

0 Answers0