摘要: #include class CBox { public://公有的函数成员 //显式构造函数 explicit CBox(double lv = 1.0, double wv = 1.0, double hv = 1.0) : m_length{ lv }, m_width{ wv }, m_heigh... 阅读全文
posted @ 2018-04-20 15:03 *夜空中最亮的星* 阅读(7397) 评论(0) 推荐(0) 编辑
摘要: #include int main() { //变量的引用 int b = 13; int& c = b; int& d = c; //常量的引用必须是const const int & a = 12; std::cout << a << ' ' << c << ' ' << d << std::endl; //一维数组的引用 int arr[10]; int(&p... 阅读全文
posted @ 2018-04-19 09:22 *夜空中最亮的星* 阅读(108) 评论(0) 推荐(0) 编辑