Pointers to member functions are a bit rigid. It would help if you showed us the line of code that generates the error, but just looking at it,
Error 2 error C2440: '=' :can't make
the conversion 'void (__thiscall
TShader::* )(const D3DXVECTOR3 &,const
std::string &)' a 'void (__thiscall
TShaderParam::* )(const TParam &,const
std::string &)'
c:\users\isagoras\documents\mcv\afoc\shader.cpp
127
So you've passed a void (TShader::* )(const D3DXVECTOR3 &,const std::string &)
but someone expects a void (TShaderParam::* )(const TParam &,const std::string &)
.
You need to reimplement setVector3
as a method of a type derived from TShaderParam
and extract your D3DXVECTOR3 &
from the first argument, which must be a TParam
. (But if it's just passing back your own value, you can static_cast
it to your own type derived from TParam
.)
Hope this helps!