"Steven Woody" <na********@gmail.comwrote in message
i've ever read a paper on the net which instruduced how to use C to
implement OOP including inheritance and virtual method table, but when
i am now tring to use it, i forget where is the paper on my hardisk.
does anyone know of the paper i mentioned? thanks.
There are lots of schemes.
What they boil down to basically this
typedef struct line
{
double (*length)(void *obj);
void (*getpoint) (void *obj, double t, double *x, double *y);
};
Then you implent straight lines, arcs, bezier curves, third order
derivatives of hyperexpentiated imaginary functions, and whatever you want,
using this interface. Then you ahve some scheme for putting the right
function pointer in place at the right time.
--
www.personal.leeds.ac.uk/~bgy1mm
freeware games to download.