using of static cast and dynamic cast

can someone explain to me how to use this?
why u keep ask me google?
I didn't even look to see what those links were. I just assumed they were to an article or two.
Those links are hilarious.

There are many, many great articles you can find with a simple google search. Google is your friend.

Check out: http://www.cplusplus.com/doc/tutorial/typecasting/
and scroll down to 'Type Casting'

Despite the code I showed (since removed), type casting should not be used for the fun of it. And it somewhat defeats the purpose of polymorphism. However, at times it can be useful to cast one type to another. Only use it when it makes sense. The examples on the link provided show give some context.
why u keep ask me google?

Because you're basically asking us to re-type information that other people have already written up, many times over, in many different ways. There are already many, many people who have explained static cast and dynamic cast. Why not go and look at what they've written, rather than trying to get someone here to do it all over again.

If you have specific questions that aren't answered by what other people have already written, then it's fine to come and ask us.

If there are things people have written that don't make sense to you, or that need clarifying, then it's fine to come and ask us.

Expecting us to re-type basic information that's already been written by others, isn't fine.
Last edited on
Topic archived. No new replies allowed.