it is probably not *very* hard if you know the virtual mechanism in c++. but your code will perhaps be hard to read.
refer to the following articles for more technical details:
http://cscene.org/CS1/CS1-02.html
http://www.accu.org/acornsig/public/articles/oop_c.html