Evo. G Tech Team Forum
Welcome to Evo. G Tech Team Forum. We have moved to a new website : www.evogtechteam.com

Thanks you.

by Evo. G Tech Team Management.


View previous topic View next topic Go down


Post by too wei on June 27th 2015, 01:53


class grandfather {};
class father:public grandfather {};
class son:public father {};

int main()
grandfather *gf = new grandfather;

father *f = static_cast(gf); //static_cast,grandfather to father
son *s = static_cast(gf); //grandfather to son //到孙类也行
father *f2 = static_cast(s); //son to father

int integer = 88;
int integer2 = static_cast(integer); //add const

return 0;


too wei

Posts : 31
Points : 19011
Reputation : 0
Join date : 2015-04-21
Age : 19
Location : Johor

View user profile

Back to top Go down

View previous topic View next topic Back to top

Permissions in this forum:
You cannot reply to topics in this forum