+ 4
A little question
How to flip over the value in string E.g String a = "Hello" //some code Output olleh
3 Réponses
+ 4
You can use string reverse iterator to generate a reversed version, as follows:
std::string str {"Hello World"};
std::string reversed {str.crbegin(), str.crend()};
std::cout << reversed;
+ 5
Loop over the string from back to front printing each char.
+ 5
Tq