steamengines

genericCDB HEADER

Apr 21st, 2015
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.98 KB | None | 0 0
  1. #ifndef GENERIC_CDB_H
  2. #define GENERIC_CDB_H
  3.  
  4. // include any system header files required for prototypes
  5.  
  6. #include <string>
  7. #include <iostream>
  8. #include <iomanip>
  9. #include <climits>
  10. using namespace std;
  11.  
  12. // function prototypes placed here
  13.  
  14. // Takes a character from the user, validates and returns a character.
  15. char getChoice(string prompt, char char1, char char2);
  16.  
  17. // Takes an integer, validates and returns the integer.
  18. int readInt(string errorMsg, int min, int max);
  19.  
  20. // Validates a decimal and will test to see if the users inputed double is valid
  21. double readDouble(string errorMsg, double min, double max);
  22.  
  23. // Takes the users input and rounds it to the decimal place the user inputs.
  24. double round(double userWhole, int userDecimal);
  25.  
  26. // Gets passed an array and displays its contents.
  27. void displayArray(const int array[], const int size);
  28.  
  29. // Copies values from one array to another array.
  30. int copyArray(int numbers2[], const int numbers1[], const int size);
  31.  
  32. #endif
Advertisement
Add Comment
Please, Sign In to add comment