home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / database / ooed / tested.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1991-03-27  |  1.1 KB  |  46 lines

  1. // Program:    Tested.cpp
  2. // Programmer: Bruce Ide
  3. // Language:   Turbo C++ 2.0
  4. // OS:         PC MOS 4.0
  5. //
  6. // Description: This program demonstrates various routines from OOED.
  7. //
  8.  
  9. #include <dos.h>
  10. #include <conio.h>
  11. #include <stdio.h>
  12. #include <stdlib.h>
  13. #include <string.h>
  14. #include "useful.hpp"
  15. #include "useful.cpp"
  16. #include "ooed.hpp"
  17. #include "ooed.cpp"
  18.  
  19. main()
  20. {
  21.  char fname[30] = {""};
  22.  char lname[30] = {""};
  23.  char ssan[12] = {""};
  24.  char ssnmask[] = {"###-##-####"};
  25.  char phonenum[14] = {""};
  26.  char phnmask[] = {"(###)###-####"};
  27.  EDSTR firsted(1, 13, fname, 30), lasted (2, 13, lname, 30);
  28.  EDPIC ssed(3, 7, ssnmask, ssan, 12), phed(4, 7, phnmask, phonenum, 14);
  29.  clrscr();
  30.  printf("First name: \n\r");
  31.  printf("Last  name: \n\r");
  32.  printf("SSAN: ");
  33.  ssed.DISPLAY();
  34.  printf("\n\rPhone: ");
  35.  phed.DISPLAY();
  36.  firsted.get();
  37.  lasted.get();
  38.  ssed.get();
  39.  phed.get();
  40.  clrscr();
  41.  printf("First name: %s\n\r", fname);
  42.  printf("Last  name: %s\n\r", lname);
  43.  printf("      SSAN: %s\n\r", ssan);
  44.  printf("     Phone: %s\n\r", phonenum);
  45. }
  46.