為什么我在第二步輸入輸入1的時候程序直接結束了啊
照著視頻打的,怎么第二步程序直接沒了,沒有結果
#include <iostream>
#include <stdlib.h>
using namespace std;
int main(void)
{
cout << "請輸入一個整數:" << endl;
int x = 0;
cin >> x;
cout << oct << x << endl;
cout << dec << x << endl;
cout << hex << x << endl;
cout << "請輸入一個布爾值(0,1):"<<endl;
bool y = false;
cin >> y;
cout << boolalpha << y << endl;
system("pause");
return();
}
2017-03-17
最后一步,return里面要有返回值