這個跟環境有關嗎
為什么我用dev輸入
#include <iostream>
#include <stdlib.h>
using namespace std;
int main();
{
bool y=false;
cin>>y;
cout<<boolalpha<<y<<endl;
? ? system("pause");
return 0;
}
有錯誤
為什么我用dev輸入
#include <iostream>
#include <stdlib.h>
using namespace std;
int main();
{
bool y=false;
cin>>y;
cout<<boolalpha<<y<<endl;
? ? system("pause");
return 0;
}
有錯誤
2019-06-22
舉報
2019-06-22
int main();? 把小括號后面的分號去掉, int main() 后面加分號相當于這一句結束了,下面大括號里面的不會執行,預編譯會提示報錯的。?