Getting error C3352 (specified function doesn't match delegate type), even though function seems to match delegate type

后端 未结 1 1880
慢半拍i
慢半拍i 2021-01-12 14:15

Here is the exact error message on compilation:

error C3352: \'double MyNamespace::MyRefClass::MyFunction(const std::vector<_Ty> &

相关标签:
1条回答
  • 2021-01-12 14:39

    I don't see the word static in your method signature. If the method isn't static, you need to pass the object to the delegate constructor. Try this:

    MyDelegate^ del = gcnew MyDelegate(this, &MyRefClass::MyFunction);
    
    0 讨论(0)
提交回复
热议问题