“运算符”在这个C ++用法中意味着什么?
char* pszVar= 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.
它标记了对转换运算符的显式调用wchar_t*
。
它指的是铸造操作员。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.