Hi there!
I use g++ compiler which is built-in in Code::Blocks 10.05 and I have quite strange problem while using reinterpret_cast operator.
I'd like to convert following expression:
Code:
tolower //function's address
into:
If I use traditional type-casting:
Code:
int (*ptr)(int) = (int (*)(int))tolower;
- everything's fine.
But if I type-casting by means of reinterpret_cast operator:
Code:
int (*ptr)(int) = reinterpret_cast<int (*)(int)>(tolower);
I'm getting the following error:
error: overloaded function with no contextual type information
What am I doing wrong ?