I'm looking at the input class project again, reviving it...
But at the moment, I am not sure sure of how to implement it and where.
These are the features that I am looking for:
- Able to ask a question.
- Able to fetch input and convert to correct type.
- Able to print a try again and retry if input is in bad format.
- Support wide strings and streams (as well as "default").
- Able to perform the ability to do input validation.
- Flexibility.
- Scalability.

Thus, it should be the work of two or max three lines for each input request.
It should be a variable to store the input (unless the input class/function stores it internally). The second should be a function call or a creating of a class instance. The third would probably be fetching or extracting the input with a stream operator or something.

It might look like:
Code:
int x;
GetInput<int>("Enter an integer: ", "That is not an integer. Try again.",
    "Integer must be larger than 10 and lesser than 20.",
    [](int x) -> bool { return x > 10 && x < 20; }, x);
Or:
Code:
int x;
CInput<int> input("Enter an integer: ", "That is not an integer. Try again.",
    "Integer must be larger than 10 and lesser than 20.",
    [](int x) -> bool { return x > 10 && x < 20 }); 
input >> x;
Goal:
To make sure there are as few lines as possible each time input is required.

Thoughts:
- Should it be a class or a function? The biggest drawback with functions that I see is that they do not support default template arguments, nor can they store input (though that may not be necessary).
- If it shall be a class, what goes into the class and what becomes utility functionality?
- Where should utility functionality reside? In a class or a function?

I would like to hear everyone's thoughts. I cannot seem to be able to separate this myself.