by: alg |
last post by:
dynamic_cast<> comes in play when to perform conversion from a pointer to a
base class to a pointer to a derived class.
I don't understand:
1. why this is so necessary since we can either use...
|
by: exits funnel |
last post by:
Hello,
I have the following simple code
//BEGIN CODE
#include <iostream>
class foo { public: virtual void fun( ) { }};
class bar : public foo {public:void fun( ) { }};
int main( )
|
by: GianGuz |
last post by:
Everyone knows about the complex and cpu-expensive procedures taken by
dynamic_cast to find the right function call in a virtual classes
hierarchy.
The question I would to rise is when...
|
by: Thomas Lorenz |
last post by:
Hello,
first, I didn't find any reference to my question through googling.
dynamic_cast uses RTTI to determine if the cast expression is valid.
Invalid casts of pointers give a '0'-result. As...
|
by: Ganesh |
last post by:
On devx site, I saw following code. It says when a derived class is
tried to cast to base type, it looks at the missing vtable and
complains if the object is already deleted.
I am of the opinion...
|
by: Boris |
last post by:
I'm porting code from Windows to UNIX and ran into a problem with
dynamic_cast. Imagine a class hierarchy with three levels: class Level2
derives from Level1 which derives from Base. If you look...
|
by: pietromas |
last post by:
In the example below, why does the dynamic_cast fail (return NULL)? It
should be able to cast between sibling classes ...
#include <iostream>
class A
{
public:
virtual const int get()...
|
by: Bo Yang |
last post by:
Hi,
I can understand static_cast, reinterpret_cast and const_cast, they
all work at compile time. But I can figure out how the C++'s dynamic-
cast works? Could you please explain how for me?...
|
by: lovecreatesbea... |
last post by:
Suppose I have the following three classes,
GrandBase <-- Base <-- Child <-- GrandChild
The following cast expression holds true only if pBase points object
of type of ``Child'' or...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|