随笔分类 - c++随笔笔记
摘要:#include<iostream> using namespace std; class base { public: int m_a; protected: int m_b; private: int m_c; }; class son :public base { public: void f
阅读全文
摘要:#include<iostream> using namespace std; class base { public: int m_a; protected: int m_b; private: int m_c; }; //公共继承 class son1 :public base { public
阅读全文
摘要:#include<iostream> using namespace std; class pagebase { public: void header() { cout << "首页、公开课、登录、注册...(公共头部)" << endl; } void footer() { cout << "帮
阅读全文
摘要:#include<time.h>//c语言 #include<ctime>//c++ srand((unsigned int )time(NULL));
阅读全文
摘要:const的修饰 1.const修饰指针 int b = 1; const int * p ; //这是常量指针 //指针指向的值不可以改变,但是指针的指向可以改变 //*p = 20;错误 //p = &b;正确 2.const修饰常量 int b = 1; int * const p ; //这
阅读全文
摘要:c++在程序执行时,将内存分为4个区域 一、代码区 存放函数体的二进制代码,有操作系统管理 *存放cpu执行的机器指令 *代码区有共享区域 *代码区有只读区域 二、全局区 存放全局变量、静态变量和常量 *全局变量和静态变量在这里 *还包括常量区,字符串常量和其他常量(const)也在这里 *该区域的
阅读全文

浙公网安备 33010602011771号