Generally the more preferable option in the majority of cases as far as I'm aware. (It'll get an entire line including whitespace, use enter to terminate input)
>template <typename T> void input_cin(T variable);
>doesn't work
Well... you need to actually write the function, too. That's just the prototype (and you probably want it to return something, so don't use void).
However, I recommend using getline() instead of cin for obvious reasons. It effectively removes nearly all issues associated with clearing the input buffer, as described here, and will fix your original problem regarding cin only grabbing a single word from the input buffer.
into something different so when I find it easier when I code.
Why do this? Is cin hard to remember? You need to get used it, you'll see it everywhere!! Think of it as "console input", this might help you remember. When I started C++ I was forgetting everything but as I learned I remember them, so do not worry
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.