I have a question about "catching the output" Example: Input "TeSTIngThis" - & gt; Output: For "test this" It is not clear what you want your loop to be easily rewritten Can be: If, like most of us, you do not have C ++ 11, then you create a functional object for a toller Will happen . But again, if you need it, you will need it again, and it is understandable to put such functional objects into your toolkit. (This is true even if you have C ++ 11: With lambda expression, the form is also clear and straightforward.) Note that I have terminated the undefined behavior you proposed: call you directly tochers (toller (VaR)); & lt; - This is what I just entered through
std :: getline (std :: cin, VAR); I do not want to print this in lower case letters. How can I "hold" this output to not appear at the command prompt?
(unsigned i = 0; i
std :: transform (var.begin (), var.end (), var.begin (), [] (four f) {tolower (static_cast & lt; Unsigned four> (ch));})
std :: transform (var.begin (), var.end (), var.begin (), toLower ()) ;
No comments:
Post a Comment