編譯器警告 (層級 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);
}