#include
<iostream
>
using namespace std
;
int
main(){
system("pause");
return 0;
}
这串代码放在windows系统的vscode上并不会报错,而是闪现一个窗口;但是在Ubuntu的vscode中会有如题所示的报错。这个时候只需加上一条编译预处理命令即可:
#include
<iostream
>
#include
<unistd
.h
>
using namespace std
;
int
main(){
system("pause");
return 0;
}
加上之后就可以正常运行,不会产生error。
转载请注明原文地址: https://lol.8miu.com/read-28487.html