r/programminghorror • • Nov 27 '25

c C—

Post image
531 Upvotes

59 comments sorted by

View all comments

Show parent comment

3

u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live" Nov 28 '25 edited Nov 28 '25

I guess a gist is too close to Github? Also, thanks.

E: What happens when you dynamic_cast to something that is not a subclass of what you have a pointer to? Obviously there is no rtti here.

2

u/TheChief275 Nov 29 '25

You can’t. The field has to exist with a name the same as its type