Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

c++.cpp File Reference

Demonstrates inheritance, virtual methods and new/delete. More...

#include <conio.h>
#include <unistd.h>
#include <dsound.h>

Go to the source code of this file.

Data Structures

class  StateChanger
 An interface class. More...
class  DisplayState
 An implementation using the display. More...

Functions

int main (int argc, char **argv)
 the user main()


Detailed Description

Demonstrates inheritance, virtual methods and new/delete.

Author:
Markus L. Noga <markus@noga.de>
A StateChanger interface class is introduced. Two subclasses implement different behaviours with virtual methods, adressing display and beeper, respectively.

main() successively generates StateChanger objects. Their virtual methods are are invoked via interface wrappers onOff() and setState(s).

Definition in file c++.cpp.


Function Documentation

int main int  argc,
char **  argv
 

the user main()

Definition at line 86 of file c++.cpp.

References StateChanger::onOff().


Generated on Fri Feb 25 08:02:40 2005 for brickos by  doxygen 1.3.9.1