C++ (Qt) QProcess process; process.start("dir"); process.waitForFinished(-1); const QString &answer = process.readAllStandardOutput();