_bstr_t::operator +=, +

Microsoft 专用

将字符追加到 _bstr_t 对象的结尾或串联两个字符串。

_bstr_t& operator+=(
   const _bstr_t& s1 
);
_bstr_t operator+(
   const _bstr_t& s1 
);
friend _bstr_t operator+(
   const char* s2,
   const _bstr_t& s1 
);
friend _bstr_t operator+(
   const wchar_t* s3,
   const _bstr_t& s1 
);

参数

  • s1,…,sn
    _bstr_t 对象。

  • s2
    多字节字符串。

  • s3
    Unicode 字符串。

备注

这些运算符执行字符串串联操作:

  • (operator+= 文件 **)**在 文件 中封装的 BSTR 将字符追加到该对象中封装的 BSTR的末尾。

  • 通过串联与将此对象的 BSTR 窗体 文件的**(operator+** 文件 **)**返回新的 _bstr_t

  • (operator+ s2 | 通过串联多字节字符串形式 s2,转换为 Unicode,然后在 文件封装的 BSTR的文件 **)**返回新的 _bstr_t

  • 通过串联与 文件封装的 BSTR 的一个 Unicode 字符串形式 s3 的**(operator+** s3**,** 文件 **)**返回新的 _bstr_t

特定于 Microsoft 的结尾

请参见

参考

_bstr_t选件类