求指教哪里出錯第一遍可以運行后面提示找到一個或多個多重定義的符號 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=true;
cin>>y;
cout<<boolalpha<<y<<endl;
system("pause");
return 0;
?}
2016-06-02
沒問題啊感覺。。復制到CodeBlock可以運行
2016-06-02
已解決 練習的時候前面的建項還在也用到了主函數所以重復了 刪除1個就好了,新手勿笑,多謝指點!