Search:
Forum
General C++ Programming
Virtual function
Virtual function
Aug 7, 2008 at 1:05pm UTC
closed account (
9605fSEw
)
Can someone explain what virtual function does..i see a class where in the header file...it is decleared like:
virtual bool Read();
how is it different from
bool Read();
Aug 7, 2008 at 3:04pm UTC
Faldrax
(324)
virtual is used with methods of classes, not functions.
Ot os part of polymorphism and indicates that the method can be redefined in a descendant class.
See
http://www.cplusplus.com/doc/tutorial/polymorphism.html
for more info.
Topic archived. No new replies allowed.
C++
Information
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs