c**********e 发帖数: 2007 | 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. |
f******y 发帖数: 2971 | 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.
|
r*******y 发帖数: 1081 | 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.
|
c**********e 发帖数: 2007 | |
r*******y 发帖数: 1081 | 5 I tried A, B, D and they are OK.
【在 c**********e 的大作中提到】 : The answer is A & C
|
c**********e 发帖数: 2007 | 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
|
c**********e 发帖数: 2007 | 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. |