Question 10: Given the following program snippet, what can we conclude about the use of dynamic_cast in C++?
来源:互联网 发布:yy老虎机源码 编辑:程序博客网 时间:2024/06/05 02:19
A. The dynamic_cast ought to be a reinterpret_cast since the concrete type is unknown.
B. The dynamic_cast is unnecessary since we know that the concrete type returned by IWidgetSelector::Selection() must be a MyItem object.
C. The dynamic_cast is redundant, the programmer can invoke Activate directly, e.g. ws->Selection()->Activate();
D. The dynamic_cast is necessary since we cannot know for certain what concrete type is returned by IWidgetSelector::Selection().
E. A polymorphic_cast should be used in place of the dynamic_cast.
D
- Question 10: Given the following program snippet, what can we conclude about the use of dynamic_cast in C++?
- Question 16: Which of the following methods can a developer use to override the default terminate() function in C++?
- Question 15: Which of the following statements describe the results of executing the code snippet below in C++?
- (NOT CLEAR)Question 18: In the given C++ code snippet, which of the following statements correctly identify how Mon of enum DOW
- Question 38: What is the output of the program below in C++?
- Question 17: Which of the following identify const-correctness failures in the C++ program below?
- The program 'java' can be found in the following packages
- Question 4: Which of the following statements correctly describe the code below in C++?
- Question 28: Which of the following statements accurately describe the new[] operator in C++?
- Question 37: In C++, which of the following statements regarding the code below are valid?
- Question 9: Which of the following statements correctly describe the results of executing the code below in C++?
- ubuntu14.10 安装maven出现The program 'mvn' can be found in the following packages错误
- Question 19: Which of the following are not pre-processor directives in C++?
- Question 43: Which of the following define valid string constants in C++?
- Question 11: Which of the following statements describe the result when standard new cannot allocate the requested storage in C+
- Question 6: Which of the following are container adapters in the STL (Standard Template Library) in C++?
- what will be the output of the following c code?
- (NOT CLEAR)Question 45: Which of the following options are returned by the typeid operator in C++?
- JVM学习索引页
- JXL生成的excel文件+JAVA文件下载功能
- 希望大家能共同学习 一起进步
- BHO在IE8下的调试
- 今天的c++练习代码———>"欧几里德算法+函数的递归解决求2个整数的最大公约数"
- Question 10: Given the following program snippet, what can we conclude about the use of dynamic_cast in C++?
- 在windows 下搭建 Nginx 服务器
- WebSphere MQ V7 发布/订阅技术
- iframe的使用技巧
- xml操作类更新(头文件分离)
- android 开机动画
- XHProf安装使用笔记
- 对IIS进行操作
- C++类工厂的原理和实现