Can we typecast a return value of a function in C or C++ programmes? | Sololearn: Learn to code for FREE!
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?

28th Mar 2018, 1:33 PM
PRITAM CHAKRABORTY
PRITAM CHAKRABORTY - avatar
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
3rd Apr 2018, 6:17 PM
Code Monkey