Question 24: Which of the following template declarations provide the correct syntax to write a template class
来源:互联网 发布:php的正则表达式 编辑:程序博客网 时间:2024/05/22 17:34
template <class T> class Derived;
that has to inherit from another template class
template <class T> class Base;?
A. template <class T, class Q> class Derived<Q> : public Base<T>
where Q can be used as the templatized type for class Derived.
B. template <class T, class Q> class Derived : public Base
where Q can be used as the templatized type for class Derived.
C. template <class T, class Q> class Derived : public Base<T>
where Q can be used as the templatized type for class Derived.
D. template <class T, class Q> class Derived<Q> : public Base
where Q can be used as the templatized type for class Derived.
E. template <class Q> class Derived<Q> : public Base
C
1. 模版类 申明和定义要写在一起
2. template <class T>
class Derived : public Base<T>
{
};
也是正确的
- Question 24: Which of the following template declarations provide the correct syntax to write a template class
- Question 25: For the code snippet below, which of the following statements provide the correct order of constructor calls when o
- Question 5: Which of the following statements regarding the benefits of using template functions over preprocessor #define macro
- (NOT CLEAR)Question 21: Which of the following statements provide a valid reason not to use RTTI for distributed (i.e. networked
- Question 6: Which of the following are container adapters in the STL (Standard Template Library) in C++?
- Question 41: Which of the following operators must be overloaded by function objects in the Standard Template Library?
- 24 Given the following steps, which would be the correct order to create a backup of an Oracle datab
- Question 46: Which of the following statements describe correct methods of handling C++ exceptions?
- Question 31: A C++ developer wants to handle a static_cast() operation for the class String shown below. Which of the following
- Question 36: Which of the following statements regarding functions' default arguments in C++ are correct?
- Question 26: Which of the following options describe the expected overhead for a class that has 5 virtual functions?
- Question 48: In C++, which of the following statements accurately describe a base class destructor calling a virtual function ov
- Question 16: Which of the following methods can a developer use to override the default terminate() function in C++?
- Question 13: Which of the following declarations of function main are standard or standard conforming extensions? (Please note t
- Question 23: Which of the following C++ keywords are designed to speed up execution of a C++ function?
- In which of the following does a C++ developer use the placement new syntax to make new allocate an
- (NOT CLEAR)Question 22: Which of the following functions of the ifstream class can be used to determine the current position of
- Question 29: The C++ code below generates a compiler error. Which of the following solutions can be used to correctly access the
- javascript Node nodeType
- SharePoint之javascript查找人或组控件
- 急求computer organization and design 4th的答案!谢谢
- 26个有用的Jquery小技巧 tips, tricks & solutions
- 再说把鸡蛋竖起来
- Question 24: Which of the following template declarations provide the correct syntax to write a template class
- 对象json输出
- vb6集成环境on error错误处理代码添加插件
- 【实战】 Linux服务器安装配置Tomcat6的Admin模块详细步骤
- 成员函数指针与高性能的C++委托(上篇)
- SMS编码之PDU – 接收短信篇
- Applet的register方法
- Question 25: For the code snippet below, which of the following statements provide the correct order of constructor calls when o
- Window对象简介