引用 | 編輯
kenivn760613
2011-03-30 14:02 |
樓主
▼ |
||
x0
請問大大:為什麼這段程式,compiler可過,但卻無法執行到最後? 有沒有高手能告知是哪裡出錯? 謝謝 #include<iostream> #include<cstdlib> #include<string> using namespace std; const int NameSize = 20; const int NumberSize = 10; struct Student { char Name; char Number; int sea1; int sea2; double total; }; void COMPUTE(Student[],int ); int main() { int Size; cout<<"請輸入人數:"; cin>>Size; Student Class; cout <&l .. 訪客只能看到部份內容,免費 加入會員 x0
|
引用 | 編輯
星辰雪
2011-03-30 22:11 |
1樓
▲ ▼ |
我認為應該是
這段錯誤了 複製程式 for (int i=0; i<Size; i++) { cout << "Class[" << i << "] 的資料是:\n" << "姓名 : " << Class[i].Name<< "\n" << "學期總成績 " <<Class[i].total<< "\n'"; } 你把這段註解 就可以執行 且不會錯誤 x0 |
引用 | 編輯
kenivn760613
2011-03-31 21:04 |
2樓
▲ |
請問
這個段落出錯 那如果需要印出執行的結果 應該如何修改呢? 謝謝 x0 |