摘要: #include <stdio.h> int i = 1; struct Test { private: int i; public: int j; int getI() { i = 3; return i; } }; int main() { int i = 2; Test test; test. 阅读全文
posted @ 2020-09-21 17:50 刘大侠GG_B 阅读(180) 评论(0) 推荐(0) 编辑
摘要: `#include<stdio.h> int main(){ const int x = 1;//x是真正意义上的常量 x进入了符号表 //C++编译器会为const常量分配内存空间,但是没有使用,要想使用这个空间,可以使用指针或者是引用 const int& rx = x;//rx是只读变量,不能 阅读全文
posted @ 2020-09-21 09:45 刘大侠GG_B 阅读(501) 评论(0) 推荐(0) 编辑