开发者

meaning of 'operator' in this C++ statement

What does the 'operator' mean in this C++ usage?

char* pszV开发者_Go百科ar= W2A(_bstr_t(bstrVar).operator wchar_t*());


forcing the compiler to choose the, apparently defined, "convert to wchar_t*" operator in that class. "that class" being whatever is returned from the _bstr_t call.


That's an explicit call to the convertion operator to wchar_t, to be sure it's this one that will be used and not another.

That said, that's ugly and certainly show a problem in the class members.


It marks an explicit call to the conversion operator to wchar_t*.


It refers to the the casting operator.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜