What is a downcast? - C++

What is a downcast?

- Converting a base-class to a derived-class is called Downcast.
- This casting must be done manually. It means that explicit type cast should be specified.
- A downcast is safe only if the object addressed at runtime is actually addressing a derived class object.
What is a derived class? Define concrete derived class.
What is a derived class? Define concrete derived class - A derived class is a class that inherits the properties from its super class...
Numeric, character and boolean data types - C++
Numeric: This is a fundamental type provided by C++ language. Integers, Floating point types come under this...
What is Typecasting? Explain with examples.
Typecasting: C++ is very strict about type compatibility. Different variable types must be cast when their values are assigned to each other.
Post your comment