Code /* kishio.h CIS 250 Dave Klick 2014-01-22 This is a header file for a set of utility functions to do input with validation. Updated 2014-02-11 to add: char getChar(const char*, const char*) */ #include /* DBL_MIN, DBL_MAX */ #include /* LONG_MIN, LONG_MAX, INT_MIN, INT_MAX */ #include /* strtod, strtol */ #include /* strlen strchr */ #include /* cin, cout */ using std::cin; using std::cout; // No "using" statements are used for the cfloat, climits, cstdlib, // and cstring libraries since they don't use namespaces. #ifndef __KISHIO_H__ #define __KISHIO_H__ namespace kishio { char getChar(const char* prompt, const char* allowed); double getDouble(const char* prompt, const double min, const double max); double getDouble(const double min, const double max); double getDouble(const char* prompt); double getDouble(); long getLong(const char* prompt, const long min, const long max); long getLong(const long min, const long max); long getLong(const char* prompt); long getLong(); int getInt(const char* prompt, const int min, const int max); int getInt(const int min, const int max); int getInt(const char* prompt); int getInt(); } // end of kishio namespace #endif