qt creator如何写最基础的C++控制台程序?
本人大一学生,对新事物感兴趣故下载了qt creator for win
目前编程应用仅限于做ACM题目
学着visual studio的样子建立了空工程然后写了
#include<iostream>
#include<string>
using namespace std;
int main()
{
cout<<"hello world"<<endl;
}
然后build run;
没有出现程序窗口,而只是回复了Starting C:\Users\renkai\Documents\project\hello-build-desktop\debug\hello.exe...
C:\Users\renkai\Documents\project\hello-build-desktop\debug\hello.exe exited with code 0
建立qt控制台程序的话,又会出现
#include <QtCore/QCoreApplication>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
return a.exec();
}
这些导致提交不能AC的赘余代码,请问我要怎么做?