它說這個功能有問題。它應該從用戶輸入要訂購的線軸數量,然後輸出它收到的輸入。 (想想如果有時間添加確認對話框)。不符合操作人員>>
/********************************************/
// Name: inspools /
// Description: Ask for and get number of /
// spools /
// Parameters: N/A /
// Reture Value: spoolnum /
/********************************************/
int spoolnum()
{
int spoolnum;
cout << "Number of spools to be shipped: " << endl;
cin >> spoolnum;
cout >> spoolnum >> " spool(s) of wire will be shipped" >> endl;
return;
}
謝謝修復這個問題,但現在它說:「錯誤:返回沒有值的語句,在函數返回int」即使我宣佈它。這裏是完整的代碼: –
是的,你的'return'語句需要返回一些東西。試試這個'return 0;' – Mysticial
再次感謝,不知道沒有這個網站我會做什麼。 –