c**********e 发帖数: 2007 | 1 Which type of construct do you use to logically group names that can be
shared across multiple source files?
a. class
b. extern
c. namespace
d. #include
e. typedef |
X****r 发帖数: 3557 | 2 I see you have been posting these basic C++ questions.
Just curious -- are you looking for answers, or just to test other
people here?
【在 c**********e 的大作中提到】 : Which type of construct do you use to logically group names that can be : shared across multiple source files? : a. class : b. extern : c. namespace : d. #include : e. typedef
|
c**********e 发帖数: 2007 | 3 我知道答案。讨论的目的是加深一下理解,理解透彻了不容易忘。
欢迎新手讨论,高手指点。
【在 X****r 的大作中提到】 : I see you have been posting these basic C++ questions. : Just curious -- are you looking for answers, or just to test other : people here?
|
E*U 发帖数: 2028 | 4 c
【在 c**********e 的大作中提到】 : Which type of construct do you use to logically group names that can be : shared across multiple source files? : a. class : b. extern : c. namespace : d. #include : e. typedef
|
r****t 发帖数: 10904 | 5 我怎么觉得 a,b,c,e 都可以,只要能在 header 里面用就可以的不是。
c 其实是 group names that are already dispersed across multiple source files. |
d**e 发帖数: 6098 | 6 b吧
【在 c**********e 的大作中提到】 : Which type of construct do you use to logically group names that can be : shared across multiple source files? : a. class : b. extern : c. namespace : d. #include : e. typedef
|
c********t 发帖数: 1756 | |
G****A 发帖数: 4160 | 8 my answer (d)
【在 c**********e 的大作中提到】 : Which type of construct do you use to logically group names that can be : shared across multiple source files? : a. class : b. extern : c. namespace : d. #include : e. typedef
|
c**********e 发帖数: 2007 | 9 The answer is c) namespace.
This is the purpose of namespaces. They provide logical groupings of
identifiers. The result of using a namespace is similar to what could be
accomplished using a class with all static members. However, unlike a class
, a namespace can be reopened to include additional identifiers.
a) class
This is incorrect. Much more than a logical grouping of names is provided by
"class." See other comments.
b) extern |