随笔分类 - MegaDataFlowers+C++学习
主要是C++学习的代码保存
摘要://继承 :class 子类 : 继承方式 父类 //子类也叫派生类 父类也叫基类 //继承方式 : 公共继承 保护继承 私有继承 //父类当中的私有的 无论子类使用哪一种继承方式 都不可以访问 //父类当中所有非静态成员属性都会被子类继承下去 //父类当中的私有成员属性 是被编译器给隐藏了 所以说
阅读全文
摘要:练习模板: 点击查看代码 #include<iostream> using namespace std; int main() { system("pause"); return 0; } 代码1:全局函数做友元 点击查看代码 #include<iostream> using namespace s
阅读全文
摘要:代码1:转义字符 点击查看代码 #include<iostream> using namespace std; void test01()//换行 { cout << "Hello World" << endl; //等价于cout << "Hello World\n" << endl; } voi
阅读全文