Програма-меню
# include
# include
# include
# include
# define LEFT 75
# define RIGHT 77
# define DOWN 13Knopka
{x1; y1; x2; y2; str [80];: setparam (int xx1, int yy1, int xx2, int yy2, char * sstr); show (int tcolor, int bcolor) ; void run (void) = 0;
}; knopka1: public Knopka
{: run (void);
}; knopka2: public Knopka
{: run (void);
}; knopka3: public Knopka
{: run (void);
}; knopka4: public Knopka
{: run (void);
}; knopka5: public Knopka
{: run (void);
}; Menu
}; main ()
{(0); (); mnu (10,1); (1). getmessage (getch ());
} Knopka :: setparam (int xx1, int yy1, int xx2, int yy2, char * sstr)
{= xx1; = yy1; = xx2; = yy2; (str, sstr);
}; Knopka :: show (int tcolor, int bcolor)
{(tcolor); (bcolor); (x1, y1, x2, y2); (); (1,1); ("% s", str);
} knopka1 :: run (void)
{str [80], b1; kstr = 1; * fin = fopen ("about.txt", "r"); (15); (1); (2,7 , 78,22); (); (feof (fin) == 0)
{(fin, "% c", & b1); (b1 == ' n') + +;
} (fin); (int i = 0; i
{(str, 80, fin); (40-0.5 * strlen (str), 1 + i * 2); (str);
} (0); (); ();
} knopka2 :: run (void)
{(P_WAIT, "notepad.exe", "notepad", "Data.txt", NULL);
} knopka3 :: run (void)
"kur.cpp", NULL);
} knopka4 :: run (void)
{(P_WAIT, "kur.exe", NULL);
} knopka5 :: run (v oid)
{(0);
} Menu :: onLeft (void)
{= (nomAct == 0)? 4: (nomAct-= 1);
} Menu :: onRight (void)
{= (nomAct == 4)? 0: (nomAct + = 1);
} Menu :: onDown (void)
{[nomAct] -> run ();
} Menu :: show (void)
{
_setcursortype (_NOCURSOR); (int i = 0; i <5; i + +) (i == nomAct) [i] -> show (actTextCol, actBgCol); [i] -> show (pasTextCol, pasBgCol);
} Menu :: getmessage (int msg)
{(msg)