摘要:
程序1: #pragma warning(disable:4996) //2022年10月12日21:26:43 #include <iostream> using namespace std; class Maker { public: Maker() { id = 0; age = 0; } M 阅读全文
posted @ 2022-10-12 21:38
CodeMagicianT
阅读(33)
评论(0)
推荐(0)
摘要:
1.赋值(=)运算符重载 赋值符常常初学者的混淆。这是毫无疑问的,因为’=’在编程中是最基本的运算符,可以进行赋值操作,也能引起拷贝构造函数的调用。 class Person{ friend ostream& operator<<(ostream& os,const Person& person){ 阅读全文
posted @ 2022-10-12 21:04
CodeMagicianT
阅读(61)
评论(0)
推荐(0)