Created
August 25, 2020 14:58
-
-
Save ampulhetadosaber/2d660404fd394360794608e4bc41f272 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string palavra = "abacaxi"; | |
reverse(palavra.begin(), palavra.end()); | |
// Caso queira inverter apenas uma parte da string | |
// basta alterar o valor dos ponteiros na função | |
// Apos inverter a string, ela ficará da seguinte forma "ixacaba" | |
cout << palavra << "\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment