Bag  0.91
Functions
io_functions.h File Reference
#include <iostream>
#include <sstream>

Go to the source code of this file.

Functions

void printMenu ()
int getInt ()
string getItem ()

Detailed Description

Contains C++ functions for printing menus, reading input values, etc.

Author
Braun
Date
9/2/14

Definition in file io_functions.h.

Function Documentation

int getInt ( )

Reads and returns an integer

Precondition
User has been prompted to enter an integer
Postcondition
none
Returns
integer value

Reads, validates, and returns a positive integer

Precondition
User has been prompted to enter an integer
Postcondition
none
Returns
positive integer value

Definition at line 30 of file io_functions.cpp.

Referenced by getBagNum().

string getItem ( )

Prompts for a list item and returns it to caller

Returns
list item
Remarks
Accepts strings with spaces

Prompts for a bag item and returns it to caller

Returns
bag item
Remarks
Accepts strings with spaces

Definition at line 46 of file io_functions.cpp.

Referenced by processOption().

void printMenu ( )

Prints main program menu

Precondition
none
Postcondition
none

Definition at line 16 of file io_functions.cpp.

Referenced by main(), and processOption().