[geeks] C++ inner workings

Big Endian geeks at sunhelp.org
Thu Nov 22 12:42:14 CST 2001


><snip>
>How does it know which read to call?  I can think of some possible ways to
>implement this functionality, but I want to know what actually occurs.

Look up "virtual function tables"  in the GCC doc or somewhere like that.

>In case people think I'm just pretending I know ways to encourage people to
>help me with homework, I'll give you one way.

I don't mind helping with homework... we're a great resource to do 
it.  Especially if you're stuck.

><snip>
>Then the initializer (possibly a macro if I was actually writing the above
>code to fake inheritence in C) would set the read pointer to the proper read
>function.  At least, that is one thought on implementing this.  Propably a
>bad one though.

This stuff is actually done at runtime in C++, not at compile time 
like this would do.

daniel
-- 
-----------------------------------------------------------------
"Fragile. Do not drop." -- Posted on a Boeing 757.



More information about the geeks mailing list