class Dad {}class Son : public Dad {}class Daughter : public Dad {}void some_function(Son *son);Dad *d = new Daughter;some_function((Son*) d);
Bad mojo indeed.
Find some other way to solve the problem if possible. For example, part of some_function() might be made into a virtual in Dad, and then overridden in Son. On the other hand, if you *know* the object is a Son, you should probably be using a pointer to a Son in the first place.
Pick it up - play with it - twist it around - repeat until it's no longer nasty :)