How to make input parameter into string ?

What command or piece of coding I can convert parameter into a string so I can run it through error checking
If you want some variable shown, cout << will take case of of printing. If you need a string, there is a stringstream class, which looks like cout, but doesn't print anything and you can get the result with str() method. For other cases, like a class of your own, either overload operator << or write a to_string() method.
Topic archived. No new replies allowed.