Page 410 - C++
P. 410

//*************************************************************************
        //**              PROJECT TITLE :  "FUN WITH ALPHABETS"                                **
        //**              PROGRAM NAME  :  PROJECT.CPP            (Main Program)                      **
        //**                         **
        //**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~**
        //** DESCRIPTION :                                                      **
        //**  1. This program includes classes, functions required for        **
        //**       the GAME MODE.                                               **
        //**  2. The main function allows for selection from                                   **
        //**     a. ADMIN MODE                                           **
        //**        (Call admin_menu() which is defined in admin.cpp)                          **
        //**     b. GAME MODE                                                   **
        //**          It allows for playing of two games                               **
        //**          a. WORD WRAP Game                                                **
        //**          b. JUMBLE WORD GAME                                       **
        //**    3. The project uses Dictionary (TEXT Files) for Words required  **
        //**       in the game.                                                        **
        //**  4. The TOP 5 scores are maintained with the help of BINARY FILES**
        //**                                                             **
        //************************************************************************
        #include <graphics.h>                //INCLUDING HEADER FILES
        #include <fstream.h>
        #include <string.h>
        #include <stdlib.h>
        #include <stdio.h>
        #include <conio.h>
        #include <dos.h>
        #include <process.h>
        #include <ctype.h>
        //********************************************************************
        //**    Following file is included for ADMIN MODE                           **
        #include "d:\nir\admin.cpp"
        //**    Following file is included for SCORE FILE initialization    **
        #include "d:\nir\fileini.cpp"
        //********************************************************************
        void screen1();         //FIRST WELCOME SCREEN
        void screen2();         //SECOND WELCOME SCREEN
        void modemenu(); //DISPLAYING THE MODE SELECTION MENU PAGE
        void dispmenu(); //DISPLAYING THE GAME MENU PAGE
        void wordwrap();        //FUNCTIONS USED FOR PLAYING WORDWRAP GAME
        void jumble();          //FUNCTIONS USED FOR PLAYING JUMBLE WORD GAME
        void wrong();                //TO DISPLAY THE FAILURE OF THE USER
        void congrats();        //TO DISPLAY THE SUCCESS OF THE USER
        int sort();           // FUNCTION TO SORT SCORES FOR WORDWRAP GAME
        int sort1();                 // FUNCTION TO SORT SCORES FOR JUMBLE WORD GAME
        //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        //                    GLOBAL OBJECTS                               ~~~
        //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        int iff=0;
        char wstr[50][50];
        int score=0;
        //*********************************************************************
        class hscorew           // DEFINITION OF THE CLASSES FOR
        {                      // HIGH SCORE OF WORDWRAP
   405   406   407   408   409   410   411   412   413   414   415