\section{demo/c++.cpp File Reference}
\label{c++_8cpp}\index{demo/c++.cpp@{demo/c++.cpp}}
Demonstrates inheritance, virtual methods and new/delete. 

{\tt \#include $<$conio.h$>$}\par
{\tt \#include $<$unistd.h$>$}\par
{\tt \#include $<$dsound.h$>$}\par
\subsection*{Data Structures}
\begin{CompactItemize}
\item 
class {\bf State\-Changer}
\begin{CompactList}\small\item\em An interface class. \item\end{CompactList}\item 
class {\bf Display\-State}
\begin{CompactList}\small\item\em An implementation using the display. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
int {\bf main} (int argc, char $\ast$$\ast$argv)
\begin{CompactList}\small\item\em the user {\bf main()}{\rm (p.\,\pageref{fontdesign_8c_a1})} \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Demonstrates inheritance, virtual methods and new/delete. 

\begin{Desc}
\item[Author:]Markus L. Noga $<${\tt markus@noga.de}$>$\end{Desc}
A {\bf State\-Changer}{\rm (p.\,\pageref{classStateChanger})} interface class is introduced. Two subclasses implement different behaviours with virtual methods, adressing display and beeper, respectively.

{\bf main()}{\rm (p.\,\pageref{fontdesign_8c_a1})} successively generates {\bf State\-Changer}{\rm (p.\,\pageref{classStateChanger})} objects. Their virtual methods are are invoked via interface wrappers on\-Off() and set\-State(s).

Definition in file {\bf c++.cpp}.

\subsection{Function Documentation}
\index{c++.cpp@{c++.cpp}!main@{main}}
\index{main@{main}!c++.cpp@{c++.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int main (int {\em argc}, char $\ast$$\ast$ {\em argv})}\label{c++_8cpp_a0}


the user {\bf main()}{\rm (p.\,\pageref{fontdesign_8c_a1})} 



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

References State\-Changer::on\-Off().