第一个Fedora12下QT Creator的控制台程序,FIle -> new file or project -> QT C++ Project -> QT Console Application
源码:
/*#include <QTextStream> static QTextStream cout(stdout, QIODevice::WriteOnly); int main(int argc, char *argv[]) { cout<<"Hello"<<endl; return 0; }*/ #include <iostream> #include <stdio.h> using namespace std; int main() { cout<<"hello world"<<endl; printf("Hello, %d\n", 34); return 0; }