-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCIT237_Util.h
More file actions
32 lines (23 loc) · 846 Bytes
/
Copy pathCIT237_Util.h
File metadata and controls
32 lines (23 loc) · 846 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Specification file for the CIT237_Util Library module
#ifndef CIT237_UTIL_H
#define CIT237_UTIL_H
#include <iostream>
#include <iomanip>
#include <fstream>
#include <cstdlib>
#include <cmath>
#include <string>
using namespace std;
// Global Constants:
const int SUCCESS = 0; // return code for SUCCESS
const int FAILURE = 1; // return code for FAILURE
// Function Prototypes
string inputStringWithDefault(string promptText, string defaultValue);
int inputIntegerWithDefault(string promptText, int defaultValue);
string inputNonEmptyString(string promptText);
int inputInteger(string promptText);
double inputDouble(string promptText);
int convertStringToInteger(string inputString);
double convertStringToDouble(string inputString);
bool confirmYN(string promptText);
#endif