Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++ - Virtual Functions, Classes and friend functions
How do you tell the compiler that a function is purely virtual and will be declared only in a sub-class ? i.e, There is not implementation for the function in the current class. Can you explicitly declare a virtual class in C++ ? [Like the abstract class keyword in Java] Are friends of base classes not friends of sub-classes ? Apr 22 2001
Pramod Subramanyan wrote:How do you tell the compiler that a function is purely virtual and will be declared only in a sub-class ? i.e, There is not implementation for the function in the current class. Apr 22 2001
class ACLASS { public: virtual int virtual_member()=0; }; With i don't know witch version of SC or DM C++ sometime i had to create the function on the .CPP: int ACLASS::virtual_member() { } Roland Pramod Subramanyan a écrit :How do you tell the compiler that a function is purely virtual and will be declared only in a sub-class ? i.e, There is not implementation for the function in the current class. Can you explicitly declare a virtual class in C++ ? [Like the abstract class keyword in Java] Are friends of base classes not friends of sub-classes ? May 02 2001
|