【发布时间】:2025-12-11 08:40:01
【问题描述】:
我有一个类似的功能:
//in header
int Foo()
// in source file
int Foo()
{
return 1;
}
在我访问的另一个源文件中,我访问的功能如下:
int aninteger;
result = Foo(aninteger);
该代码正在编译而没有发出任何警告。知道为什么吗? 如何设置 Visual Studio 以警告我函数调用中的参数不匹配?
【问题讨论】:
-
您实际上是否包含了该标题?可以显示minimal reproducible example 吗?
标签: c function syntax parameter-passing