编译器警告(等级 4)C4100
“identifier”:未引用的形参
函数主体中未引用形参。 忽略未引用的参数。
当代码在基元类型的其他未引用参数上调用析构函数时,也会发出 C4100。 这是 Microsoft C++ 编译器的一个限制。
以下示例生成 C4100:
// C4100.cpp
// compile with: /W4
void func(int i) { // C4100, delete the unreferenced parameter to
//resolve the warning
// i; // Or uncomment this line to add a reference
}
int main()
{
func(1);
}