in >> qstr or qstr = in.readLine()

78 Views Asked by At

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!

0

There are 0 best solutions below