[Dev-C++] C++ Virtual function Tables and Implementation
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: <eng...@ju...> - 2004-06-09 04:32:56
|
Greetings,
I would like to know if the C++ standard specifys how the virtual fucntion tables are to implemented by the compiler writers? Also can any tell me if other languages besides Borland C++ and Borland Delphi have compatible object binaries?
Example Code:
class InternetConnection {
public:
............virtual int iconnect(...) =0; //Pure Virtual Method
};
class DSLConnection : public InternetConnection {
public:
............virtual int iconnect(...); //definition not shown
};
class ISDNConnection : public InternetConnection {
public:
............virtual int iconnect(...); //definition not shown
}
class DailupConnection : public InternetConnection {
public:
............. virtual int iconnect(...); //definition not shown
};
//////////////////////////////////////////////////////////////////////
////This class is not derived from InternetConnection
//////////////////////////////////////////////////////////////////////
class ExportedConnection {
public:
.........virtual int iconnect(...); //definition not shown
};
InternetConnection can point to a pointer of type ExportedConnection and execute the virtual functions of that class object. Are there any other languages that are compatible besides Borland Delphi and Borland C++? I'm aware that this works also on Unix with C++.
Thanks,
Jim E. Smith
________________________________________________________________
The best thing to hit the Internet in years - Juno SpeedBand!
Surf the Web up to FIVE TIMES FASTER!
Only $14.95/ month - visit www.juno.com to sign up today!
|