Appending BSTR in a LPCSTR
问题 I have a class function which is receving a BSTR. In my class I have a member variable which is LPCSTR. Now I need to append BSTR ins LPCSTR. How I can do that. Here is my function. void MyClass::MyFunction(BSTR text) { LPCSTR name = "Name: "; m_classMember = name + text; // m_classMember is LPCSTR. } in my m_classMember I want that after this function value should be "Name: text_received_in_function". How i can do that. 回答1: Use the Microsoft specific _bstr_t class, which handles the ANSI