1. Find the line that is causing the error. The full error message should contain that info.
2. That line contains some kind of function calls that is able to deal with different types of input, e. g. a template function, or maybe a function of the printf() family.
3. In that function call, analyze what, exactly should be the argument types in this paticular case.
4. Check if the arguments passed are actually the ones that you meant to pass, not e. g. a pointer to the actual object, or a struct containing the object.
5. It may well be that a static_cast (as suggested) would eliminate the error, but chances are that your are not passing the right argument, and that you should fix that - or else you'll be stuck with a rather hard to locate run time error!
Or simply post the actual code here and we can perform these steps for you...
P.S.:
Quote:
I know it is related with static_cast<>
Most certainly not! If anything, static_cast tends to obscures errors, not introduce new ones. However, it's impossible to say in this case as long as you don't show the code.
Quote:
what is the target type to convert? ATL::CStringT?
The error message doesn't say. And we can't say either, because you haven't provided the code. But, obviously, ATL:CStringT is what the type currently is, and it is wrong. So, no, that is the one type that we can say for sure that you shouldn't convert it to!