摘要:
运算符重载 运算符重载是对已有的运算符进行重新定义(operator ) 1.加号运算符重载 #include <iostream> using namespace std; //运算符重载对已有的运算符重新定义 //加号运算符重载 class person { public: int m_a; i 阅读全文
摘要:
指针 1.指针的定义 指针记录变量的地址 定义 :数据类型 * 变量名 赋值 :int *p=&a int *p=&a p表示指针所指向的内存地址 *p表示内存所指向的内存地址中的值 int main(){ //1.定义指针 指针记录变量的地址 int a = 10; int * p; // int 阅读全文