编译器错误 C3352
“function”:指定的函数与委托类型“type”不匹配
function
的参数列表与委托不匹配。
有关详细信息,请参阅委托(C++ 组件扩展)。
以下示例生成 C3352:
// C3352.cpp
// compile with: /clr
delegate int D( int, int );
ref class C {
public:
int mf( int ) {
return 1;
}
// Uncomment the following line to resolve.
// int mf(int, int) { return 1; }
};
int main() {
C^ pC = gcnew C;
System::Delegate^ pD = gcnew D( pC, &C::mf ); // C3352
}
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈