Skip to main content
Ctrl+K
Jörg Faschingbauer - Home Jörg Faschingbauer - Home
  • Training Courses
  • About
  • Blog
  • Training Courses
  • About
  • Blog

Section Navigation

  • Course Descriptions
  • Pricing, Organizational
  • Log Of Past Courses
  • Complete Slide Material
    • Linux: Introduction, Userland/Kernel Programming, Hardware/Embedded
    • Python Programming
    • C Programming
    • C++ Programming
      • C++ < 11
        • Introduction
        • Data Encapsulation
        • Functions and Methods
        • Exceptions
        • C++ Template Basics
        • Standard Template Library
        • Dynamic Memory Allocation, Resource Management
        • Inheritance And Object Oriented Design
        • The Standard Library: Miscellaneous Topics
        • Exercises: User Database
        • Exercises: Miscellaneous
      • C++ >= 11
      • Design Patterns With C++
      • C++: Miscellaneous Live-Hacking
      • C++ Code
      • C++ Exercises
    • Build Tools, Unit Testing, Design, And More
  • Training Courses
  • Complete Slide Material
  • C++ Programming
  • C++ < 11
  • Standard Template Library
  • Algorithms
  • reverse<>: Reversing In-Place

Documentation

  • std::reverse @ cppreference.com

  • std::reverse @ cplusplus.com

reverse<>: Reversing In-Place#

  • Live Hacking

Live Hacking#

code/reverse-string-reverse.cpp#
#include <string>
#include <iostream>
#include <algorithm>

using namespace std;


int main()
{
    string s;
    cin >> s;

    std::reverse(s.begin(), s.end());

    cout << s << endl;

    return 0;
}
On this page
  • Live Hacking

© Copyright 2019-2025 (GPLv3), Jörg Faschingbauer.

Created using Sphinx 8.1.3.

Built with the PyData Sphinx Theme 0.16.1.

Show Source