【单选题】In the following description of a const member, the error is (). (2.0分)
A. Const members are specified with the keyword const B. There are two types of const member: const data member and const member function C. The initialization of a const data member occurs when it is defined in the class body D. The value of a const data member cannot be changed
A. Const members are specified with the keyword const B. There are two types of const member: const data member and const member function C. The initialization of a const data member occurs when it is defined in the class body D. The value of a const data member cannot be changed
举一反三
- What do the following declarations mean? a) const int a; b) int const a; c) const int *a; d) int * const a; e) int const * a const;
- 【单选题】下面定义中只限定指针pstr所指空间内容不可修改的是() A. const char * pstr= “abcdef”; B. const char * const pstr= “abcdef”; C. char * pstr= “abcdef”; D. char * const pstr= “abcdef”;
- 下面几组代码正确的是 A: const int a; B: const int a; a=1; C: const int a=1; D: int const a=1;
- 以下符号常量的类型说明符使用正确的是() A: const A!=2000 B: const A%=20.3 C: const A%="123" D: const A$=True
- this指针既可以是指向const对象的非const指针,也可以是指向非const对象的const指针