input.h File Reference
#include <iostream>
#include "arrutil.h"
Go to the source code of this file.
|
Functions |
template<typename ItemType> |
ItemType | get_bounded_both (ItemType lower, ItemType upper, std::istream &read_from=std::cin, const char prompt[]="Enter value: ", bool supress=false, const char errmsg[]="Invalid -- try again!\n") |
template<typename ItemType> |
ItemType | get_bounded_upper (ItemType upper, std::istream &read_from=std::cin, const char prompt[]="Enter value: ", bool supress=false, const char errmsg[]="Invalid -- try again!\n") |
template<typename ItemType> |
ItemType | get_bounded_lower (ItemType lower, std::istream &read_from=std::cin, const char prompt[]="Enter value: ", bool supress=false, const char errmsg[]="Invalid -- try again!\n") |
char | get_in_set (const char valid[]="YyNn", const char prompt[]="Would you like to quit? ", const char errmsg[]="Invalid response! Choose Yes or No!\n") |
Function Documentation
template<typename ItemType>
ItemType get_bounded_both |
( |
ItemType |
lower, |
|
|
ItemType |
upper, |
|
|
std::istream & |
read_from = std::cin , |
|
|
const char |
prompt[] = "Enter value: " , |
|
|
bool |
supress = false , |
|
|
const char |
errmsg[] = "Invalid -- try again!\n" | |
|
) |
| | [inline] |
template<typename ItemType>
ItemType get_bounded_lower |
( |
ItemType |
lower, |
|
|
std::istream & |
read_from = std::cin , |
|
|
const char |
prompt[] = "Enter value: " , |
|
|
bool |
supress = false , |
|
|
const char |
errmsg[] = "Invalid -- try again!\n" | |
|
) |
| | [inline] |
template<typename ItemType>
ItemType get_bounded_upper |
( |
ItemType |
upper, |
|
|
std::istream & |
read_from = std::cin , |
|
|
const char |
prompt[] = "Enter value: " , |
|
|
bool |
supress = false , |
|
|
const char |
errmsg[] = "Invalid -- try again!\n" | |
|
) |
| | [inline] |
char get_in_set |
( |
const char |
valid[] = "YyNn" , |
|
|
const char |
prompt[] = "Would you like to quit? " , |
|
|
const char |
errmsg[] = "Invalid response! Choose Yes or No!\n" | |
|
) |
| | |