New course! Every coder should learn Generative AI!
Try a free lesson+ 1
Can we typecast a return value of a function in C or C++ programmes?
1 Answer
+ 1
Yes, you can use dynamic cast to cast a derived class to a base class and vice versa, provided that the target class is indeed that type