摘要:
直接上代码: #include<stdio.h> #include<string> #include<iostream> using namespace std; class Student { private: int age; string name; public: Student(int, 阅读全文
posted @ 2016-03-02 13:44
puyangsky
阅读(7782)
评论(0)
推荐(4)
摘要:
用法: const int & a; 定义了一个整型常引用变量a。 特点: 1、不能够通过常引用变量来修改其值,如: const int & a = 10; a = 12;//编译报错! 2、可以通过非常引用变量给常引用变量赋值,反之则不行。 const int & a = 10; int & b 阅读全文
posted @ 2016-03-02 11:37
puyangsky
阅读(1447)
评论(0)
推荐(0)

浙公网安备 33010602011771号