1. 程式人生 > >error #18 expected a “)”和error #140 too many arguments in function call

error #18 expected a “)”和error #140 too many arguments in function call

1.當巨集定義名和函式形參名衝突時,會在函式宣告的地方出現錯誤error #18 expected a “)”

例如:#define SlaveAddress 0xD0 uint8_t Single_ReadI2C(uint8_t SlaveAddress, uint8_t REG_Address);

    因SlaveAddress名字衝突發生錯誤,解決方法:修改巨集定義名或形參名

2.如果函式有多個形參,還會在函式呼叫的地方出現引數過多的報錯 error #140 too many arguments in function call