home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0000 - 0009 / ibm0000-0009 / ibm0003.tar / ibm0003 / LCNOW2.ZIP / EXAMPLES / STATES.H < prev    next >
Encoding:
C/C++ Source or Header  |  1988-08-02  |  828 b   |  30 lines

  1. /*
  2.  * states.h
  3.  *
  4.  * Header file for the STATES program
  5.  */
  6.  
  7.  
  8. /*
  9.  * Data structure definition and initialization
  10.  *
  11.  * Initialize the state data in the array of data structures.
  12.  * The list includes only those states the author has called "home".
  13.  * If your state is not included, simply add the required data.
  14.  */
  15.  
  16. struct state_st {
  17.     char *code;        /* postal code for state name */
  18.     char *name;        /* state name */
  19.     char *capital;        /* capital city */
  20.     unsigned population;    /* in thousands */
  21.     unsigned area;        /* in square miles */
  22. } State[] = {
  23.     { "CO", "Colorado", "Denver", 2208, 104247 },
  24.     { "MA", "Massachusetts", "Boston", 5689, 8257 },
  25.     { "MD", "Maryland", "Annapolis", 3923, 10577 },
  26.     { "RI", "Rhode Island", "Providence", 950, 1214 }
  27. };
  28.  
  29. #define NSTATES sizeof State / sizeof (struct state_st)
  30.