void find();void searchmenu(); void managemenu(); void readOut();void creatfile();void readcustomer(); int comptime();error C2660: 'readcustomer' : function does not take 1 parameterserror C2664: 'readOut' : cannot convert parameter 1 from 'struct Flight [20]' to 'struct node
1 回答

catspeake
TA貢獻1111條經驗 獲得超0個贊
error C2660: 'readcustomer' : function does not take 1 parameters
意思是:函數 readcustomer 不是攜帶1個輸入參數
這個是調用readcustomer時的參數數量與函數定義不匹配。
解決辦法,修改調用函數調用語句或是函數定義。
error C2664: 'readOut' : cannot convert parameter 1 from 'struct Flight [20]' to 'struct node
意思是:函數readOut在被調用時,不能把輸入參數1從結構體 Flight [20]類型轉變成結構體 node類型,
這個是參數傳遞的類型錯誤,傳入的結構體與函數定義中使用的結構體不一致導致。
解決辦法,調整傳入的結構體參數的結構或是修改函數定義中使用的結構體結構。如果一定要這樣用,可以考慮用指針傳遞進行強制轉型,不過要注意傳入參數與函數中使用參數的邏輯對應。
- 1 回答
- 0 關注
- 150 瀏覽
添加回答
舉報
0/150
提交
取消