home *** CD-ROM | disk | FTP | other *** search
- // Program: Tested.cpp
- // Programmer: Bruce Ide
- // Language: Turbo C++ 2.0
- // OS: PC MOS 4.0
- //
- // Description: This program demonstrates various routines from OOED.
- //
-
- #include <dos.h>
- #include <conio.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include "useful.hpp"
- #include "useful.cpp"
- #include "ooed.hpp"
- #include "ooed.cpp"
-
- main()
- {
- char fname[30] = {""};
- char lname[30] = {""};
- char ssan[12] = {""};
- char ssnmask[] = {"###-##-####"};
- char phonenum[14] = {""};
- char phnmask[] = {"(###)###-####"};
- EDSTR firsted(1, 13, fname, 30), lasted (2, 13, lname, 30);
- EDPIC ssed(3, 7, ssnmask, ssan, 12), phed(4, 7, phnmask, phonenum, 14);
- clrscr();
- printf("First name: \n\r");
- printf("Last name: \n\r");
- printf("SSAN: ");
- ssed.DISPLAY();
- printf("\n\rPhone: ");
- phed.DISPLAY();
- firsted.get();
- lasted.get();
- ssed.get();
- phed.get();
- clrscr();
- printf("First name: %s\n\r", fname);
- printf("Last name: %s\n\r", lname);
- printf(" SSAN: %s\n\r", ssan);
- printf(" Phone: %s\n\r", phonenum);
- }
-