Abstract function calls

Started by
3 comments, last by Lestat3D 22 years, 1 month ago
Hi, how can I declare abstract functions in c++, I think it's on this way: virtual Func(args) = 0; isn't it? Though I've declared this class: class CClassName { public: virtual void Func(LPVOID Arg) = 0; ... }; How can I know in runtime whether this function where declared in any descendant class? Edited by - felisandria on February 21, 2002 3:44:14 PM
Advertisement
You always know at runtime that it is because your program will not compile unless it IS overriden in a descendant class.
You ar talking about virtual functions but I''m talking about PURE VIRTUAL functions, just look at that ''=0'' after the function.

Your code will not compile if the derived class does not implement the abstract function.
For the second time, please stop with the all-caps topics. Thanks.

Your friendly moderator, fel
~ The opinions stated by this individual are the opinions of this individual and not the opinions of her company, any organization she might be part of, her parrot, or anyone else. ~

This topic is closed to new replies.

Advertisement