--- description: "Learn more about: _com_error::operator=" title: "_com_error::operator=" ms.date: 11/17/2022 f1_keywords: ["COMDEF/_com_error::operator=", "_com_error::operator="] helpviewer_keywords: ["_com_error operator= [C++]"] ms.assetid: b9cc4094-d055-450c-b45a-0a95317488f8 --- # `_com_error::operator=` **Microsoft Specific** Assigns an existing `_com_error` object to another. ## Syntax ```cpp _com_error& operator=( const _com_error& that ) throw (); ``` ### Parameters *`that`*\ A `_com_error` object. **END Microsoft Specific** ## See also [`_com_error` class](../cpp/com-error-class.md)