Ok now the problem is this.
I have compiled some old code with Visual Studio 2008 (the code was
originally writen in Visual Studio 6) and i have this error:
Error 1 error C2681: 'void *' : invalid expression type for
dynamic_cast c:\Works\BaCCTe ster\Dev\Addins \Utils
\CommonDataMani pulators\Source s\CommonDataFre e.cpp 121
CommonDataManip ulators
and the problematic line of code is this:
....
FunctionRespons e* pFunctionRespon se =
ACE_dynamic_cas t(FunctionRespo nse*, data);
....
So it is logicaly that dynamic_cast does not work for void-pointers
since when I converted the pointer to void I have given up all type
information. But what makes me think twice about the corectness of the
previous sentence is that this code compiles perfectly under Visual
Studio 6. I would like to know more about this issue so any help,
references, links and so are highly appriciated.
Thank You,
Nikola Tanev
I have compiled some old code with Visual Studio 2008 (the code was
originally writen in Visual Studio 6) and i have this error:
Error 1 error C2681: 'void *' : invalid expression type for
dynamic_cast c:\Works\BaCCTe ster\Dev\Addins \Utils
\CommonDataMani pulators\Source s\CommonDataFre e.cpp 121
CommonDataManip ulators
and the problematic line of code is this:
....
FunctionRespons e* pFunctionRespon se =
ACE_dynamic_cas t(FunctionRespo nse*, data);
....
So it is logicaly that dynamic_cast does not work for void-pointers
since when I converted the pointer to void I have given up all type
information. But what makes me think twice about the corectness of the
previous sentence is that this code compiles perfectly under Visual
Studio 6. I would like to know more about this issue so any help,
references, links and so are highly appriciated.
Thank You,
Nikola Tanev
Comment