|
the whole 'point' of a void pointer is to point to an object of unknown type at run-time, rather than compile-time. this is usually done with polymorphism (one thingie can be one of many thingies). the simple example can be animal sounds.
you start your program with several classes, all inheriting from the abstract class animal. it has a pure virtual function known as sound, (denoted by function_name() = 0) which has the property of echoing the animal sounds by those which the user has decided upon. we use a switch @ run-time to find out which animal sound we should make!
if this doesn't make sense, read up on c++ and polymorphism.
good luck!
__________________
i put on my robe and wizard hat...
Have you ever heard of Plato, Aristotle, Socrates?...Morons.
|