C++ =操作符重载
时间: 2023-08-30 22:12:53 浏览: 120
在C++中,=操作符不能被重载。这是因为=操作符用于赋值,它已经有了固定的语义和行为。你可以重载其他运算符,比如+、-、*等,但不能重载=操作符。\[1\]
#### 引用[.reference_title]
- *1* *3* [十个 C++ 运算符重载示例,看完不懂打我...](https://blog.csdn.net/luckydarcy/article/details/121599696)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [C++:运算符重载](https://blog.csdn.net/qq_53826699/article/details/118118074)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文