Hi , i want to use the QTextStream for stdin , stdout & stderr. Here is my code :
Qt Code:
#include <QString> #include <QFile> #include <QTextStream> int main() { QString Path; Output << "Enter your path : "; Input >> Path; Error << "Error : path does not exist." << endl; exit(-1); } else { // Some work... } }To copy to clipboard, switch view to plain text mode
The Input >> & Error << will work , but the Output << won't print anything (Without any compile error) it will cause a runtime error , why ?
Bookmarks