Hi
I'm seeing askNumber() in many instances but I can't trace it back to a clear-cut definition or locate it in a Glossary or reference list. I can't find it through Searches here or in Google or other places, except where it's mentioned within Code. There's no direct listing, definition, or full explanation of it.
If it is a member of a Class, to which Class does it belong?
What Glossary of Terms contains it?
Can you provide a link as to where you've seen this?
If it's from links such as:
http://stackoverflow.com/questions/11376767/vector-subscription-error-in-c
or
the first few link brought up by the "google search engine"
then those were functions created by the individual programmers.
This is code illustrated in the above link:
1 2 3 4 5 6 7 8 9 10 11 12
//asks a number within a range ans keeps asking untill the number is within that range, next it return that number within the specific range
int askNumber(string question, int high, int low)
{
int number;
do
{
cout <<question << " (" <<low <<" - " <<high <<"): ";
cin >> number;
}while (number > high || number < low);
return number;
}
Other askNumber posts on http://www.cplusplus.com/:
http://www.cplusplus.com/search.do?q=askNumber
Most likely you were taught how to write the function yourself early in your course or textbook and simply forgot that it was something you had to make yourself.