2022年11月28日
摘要: 1 #include<iostream> 2 using namespace std; 3 4 class Cube 5 { 6 public: 7 8 int func_v() 9 { 10 return m_H * m_W * m_L; 11 } 12 void func_g(int h, in 阅读全文
posted @ 2022-11-28 22:32 小凉拖 阅读(53) 评论(0) 推荐(0)
摘要: 定义函数时指定的返回值类型实际上指定的就是这个临时变量的类型。上图表明这个临时变量是int型的引用,这个引用接收了变量a,然后主函数中这个临时变量将值传给了引用ref2,ref2成了a的别名 阅读全文
posted @ 2022-11-28 10:04 小凉拖 阅读(55) 评论(0) 推荐(0)