too many arguments to function
时间: 2023-08-31 07:07:38 浏览: 341
回答: "too many arguments to function"错误通常发生在函数调用时传递了太多的参数。这可能是因为函数的定义和函数的调用之间的参数数量不匹配。在引用\[1\]中的代码中,函数func1的定义是void func1(void),它没有参数,但在main函数中调用func1时传递了一个参数&p。这导致了"too many arguments to function"错误的发生。要解决这个问题,可以修改函数的定义,使其接受一个参数,或者在函数调用时删除多余的参数。
#### 引用[.reference_title]
- *1* [[Error] too many arguments to function 'func1'(DEV编辑器)](https://blog.csdn.net/weixin_45375831/article/details/96473417)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [编译错误“Too many arguments to function call....”](https://blog.csdn.net/potato512/article/details/44489537)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [objc_msgsend 报错 Too many arguments to function call](https://blog.csdn.net/lnking1992/article/details/127286321)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文