Implementation file corresponding to utilities.h. More...
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <fstream>
#include <iostream>
#include <iomanip>
#include <set>
#include <string>
#include <vector>
#include "utilities.h"
Namespaces | |
Scobey | |
Contains one typedef, eleven named constants, fifteen free functions, and five utility classes. | |
Functions | |
void | Scobey::ClearScreen (int numLines=25) |
Clears the screen (the default output stream, which is assumed by default to have 25 lines). More... | |
void | Scobey::DisplayTextfile (const string &fileName, int numberOfLinesPerPause=23) |
Displays a file of text numberOfLinesPerPause lines at a time. More... | |
int | Scobey::gcd (int a, int b) |
Finds the greatest common divisor of two nonnegative integers, at least one of which is strictly positive. More... | |
bool | Scobey::isEven (int n) |
Determines if a positive integer is even. More... | |
bool | Scobey::isOdd (int n) |
Determines if a positive integer is odd. More... | |
int | Scobey::numberOfDigits (int n) |
Finds the number of digits in a positive integer. More... | |
void | Scobey::Pause (int indentLevel=0, string message="", int pauseNumber=0) |
Causes the program to pause and wait for the user to press Enter to continue, with default values for the indentation level, the message supplying any additional information to the user, and the pause number. More... | |
void | Scobey::ReadChar (const string &userPrompt, char &charValue) |
Gets a character (char) value from the user. More... | |
void | Scobey::ReadDouble (const string &userPrompt, double &doubleValue) |
Gets a real (double) value from the user. More... | |
void | Scobey::ReadInt (const string &userPrompt, int &intValue) |
Gets an integer (int) value from the user. More... | |
void | Scobey::ReadNextLine (const string &userPrompt, string &lineValue) |
Reads the text entered by a user on the line following the prompt. More... | |
void | Scobey::ReadThisLine (const string &userPrompt, string &lineValue) |
Reads the text entered by a user on the same line as the prompt. More... | |
void | Scobey::ReadString (const string &userPrompt, string &stringValue) |
Gets a whitespace-delimited string value from the user. More... | |
bool | Scobey::userSaysYes (const string &question) |
Gets the user's yes-or-no answer to a single question. More... | |
Implementation file corresponding to utilities.h.
This file contains implementations of the following, in the given order:
The source code of this file is not available to the users of the Scobey namespace items provided by this utilities package. To make use of those facilities, a source code file must include utilities.h and link to utilities.obj (under Windows) or utilities.o (under Linux).