Redian新闻
>
C++ Q88: nested non-template class
avatar
C++ Q88: nested non-template class# JobHunting - 待字闺中
c*e
1
Multiple choice: Which of the following statements are true?
A. Non-template classes can be nested.
B. It is possible to nest one class template inside another.
C. Class templates cannot be nested.
D. Class templates can be nested.
avatar
f*y
2
abd

【在 c**********e 的大作中提到】
: Multiple choice: Which of the following statements are true?
: A. Non-template classes can be nested.
: B. It is possible to nest one class template inside another.
: C. Class templates cannot be nested.
: D. Class templates can be nested.

avatar
r*y
3
A, B , D?

【在 c**********e 的大作中提到】
: Multiple choice: Which of the following statements are true?
: A. Non-template classes can be nested.
: B. It is possible to nest one class template inside another.
: C. Class templates cannot be nested.
: D. Class templates can be nested.

avatar
c*e
4
The answer is A & C
avatar
r*y
5
I tried A, B, D and they are OK.

【在 c**********e 的大作中提到】
: The answer is A & C
avatar
c*e
6
The explanation is: Non-template classes can be nested, whereas class
templates cannot.
But I am not sure if they are correct.

【在 c**********e 的大作中提到】
: The answer is A & C
avatar
c*e
7
More explanation from the study material:
"One thing to keep in mind when writing class templates is that although non
-template classes can be nested, class templates cannot."
"Nesting one class template inside another generates a syntax error."
But I am not sure.
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。