qt creator如何写最基础的C++控制台程序?

gaelookair gaelookair 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
本人大一学生,对新事物感兴趣故下载了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的赘余代码,请问我要怎么做?
...全文
评论 6
收藏 已收藏
分享
返回顶部
gaelookair
新手乐园 33,315 成员 41,769 内容