摘要: //#include<iostream> //using namespace std; // //class Stu //{ //public: // int temp; // Stu(int t) // { // temp = t; // } // //负号 // int operator-() 阅读全文
posted @ 2022-12-01 16:13 努力的阿坤 阅读(34) 评论(0) 推荐(0) 编辑
摘要: //#include<iostream> //using namespace std; // //class Stu //{ //public: // int a; // Stu(int a1) // { // a = a1; // } // //关系运算符重载 // int operator>=( 阅读全文
posted @ 2022-12-01 16:13 努力的阿坤 阅读(74) 评论(0) 推荐(0) 编辑
摘要: //#include<iostream> //using namespace std; // //class Stu //{ //public: // int a; // Stu() // { // a = 26; // } // int operator+(int b) //在类内重载,左边参数若 阅读全文
posted @ 2022-12-01 16:12 努力的阿坤 阅读(47) 评论(0) 推荐(0) 编辑
摘要: //#include<iostream> //using namespace std; // // //class Stu //{ //public: // int a; // double b; // // Stu() // { // a = 12; // b = 13.13; // } //}; 阅读全文
posted @ 2022-12-01 16:10 努力的阿坤 阅读(62) 评论(0) 推荐(0) 编辑
摘要: //#include<iostream> //using namespace std; // //#define SUM(x) ((x)*(x)) //定义一个宏参数 // // //inline void fun(int i) //{ // cout << (i * i); // //} // / 阅读全文
posted @ 2022-12-01 16:09 努力的阿坤 阅读(20) 评论(0) 推荐(0) 编辑
摘要: //#include<iostream> //using namespace std; // //class Stu //{ //public: // int *a; // Stu() // { // a = new int[2]; // a[0] = 13; // a[1] = 12; // } 阅读全文
posted @ 2022-12-01 16:08 努力的阿坤 阅读(22) 评论(0) 推荐(0) 编辑
摘要: //#include<iostream> //using namespace std; // //class Stu //{ //public: // int b; // char c[4]; // Stu() //构造函数 // { // b = 4; // c[0] = 'a'; // strc 阅读全文
posted @ 2022-12-01 16:06 努力的阿坤 阅读(13) 评论(0) 推荐(0) 编辑
摘要: //#include<iostream> //using namespace std; // //class Stu //{ //public: // static int b; //静态成员无论赋值如何变化,一个静态成员只有一个空间 // Stu() // { // b++; // } // // 阅读全文
posted @ 2022-12-01 16:03 努力的阿坤 阅读(31) 评论(0) 推荐(0) 编辑
摘要: //#include<iostream> //using namespace std; // //class Ten //{ //private: // static int c; //当静态成员函数在私有成员下定义,类外不可对其进行访问 //public: // static int a; //静 阅读全文
posted @ 2022-11-24 22:15 努力的阿坤 阅读(32) 评论(0) 推荐(0) 编辑
摘要: //#include<iostream> //using namespace std; // //class Seven //{ //public: // //构造函数和析构函数不能定义为常函数 // int a; // // Seven() // { // a = 12; // } // // ~ 阅读全文
posted @ 2022-11-24 22:14 努力的阿坤 阅读(90) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示