how to swap string characters in c++
C++
#include <string>
#include <algorithm>
std::string s = "03/02";
std::swap(s[1], s[4]);
Also in C++:
- Title
- reference function in c++
- Category
- C++
- Title
- friend function in c++
- Category
- C++
- Title
- substr c++
- Category
- C++
- Title
- variadic templates
- Category
- C++
- Title
- capitalize first letter c++
- Category
- C++
- Title
- binary representation differ in bits
- Category
- C++
- Title
- how to format decimal palces in c++
- Category
- C++
- Title
- compare values within within a vector c++
- Category
- C++
- Title
- c++ get length of array
- Category
- C++
- Title
- convert string to stream c++
- Category
- C++
- Title
- findung the mode in c++
- Category
- C++
- Title
- trovare il valore massimo in un array c++ w3
- Category
- C++
- Title
- cin.fail()
- Category
- C++
- Title
- how to delete an element in vector pair in cpp
- Category
- C++
- Title
- how to check datatype of a variable in c++
- Category
- C++
- Title
- max three values c++
- Category
- C++
- Title
- check for bst
- Category
- C++
- Title
- conditional operator in cpp
- Category
- C++
- Title
- c++ string to vector int
- Category
- C++
- Title
- if esle in c++
- Category
- C++
- Title
- how to find the mode of a vector c++
- Category
- C++
- Title
- minimum swaps to sort an array
- Category
- C++
- Title
- worker class c++
- Category
- C++
- Title
- c++ short if
- Category
- C++
- Title
- c++ while true loop
- Category
- C++
- Title
- modulo c++
- Category
- C++
- Title
- gcd in c++
- Category
- C++
- Title
- switch c++
- Category
- C++
- Title
- git branch in my bash prompt
- Category
- C++
- Title
- mysqli connect
- Category
- C++
- Title
- c++ clear stream
- Category
- C++
- Title
- inserting an element in an set c++
- Category
- C++
- Title
- rand c++
- Category
- C++
- Title
- comparing strings c++
- Category
- C++
- Title
- counting valleys hackerrank solution in c++
- Category
- C++
- Title
- how long can a c++ string be
- Category
- C++
- Title
- c++ read matttrix from text file
- Category
- C++
- Title
- how to convert a string to a double c++
- Category
- C++
- Title
- Find the duplicate in an array of N integers.
- Category
- C++
- Title
- check if key exists in map c++
- Category
- C++
- Title
- zeros of array c++
- Category
- C++
- Title
- how to inject a dll into a game c++
- Category
- C++
- Title
- how to use wasd c++
- Category
- C++
- Title
- compile c++ program
- Category
- C++
- Title
- c++ overload operator
- Category
- C++
- Title
- runtime error in c++
- Category
- C++
- Title
- make an x using asterisk c++
- Category
- C++
- Title
- create new file c++
- Category
- C++
- Title
- c++ code to print hello world
- Category
- C++
- Title
- matrix eigen c++ example
- Category
- C++
- Title
- how to concatinate two strings in c++
- Category
- C++
- Title
- SFML window
- Category
- C++
- Title
- how to turn int into string c++
- Category
- C++
- Title
- sort function in cpp
- Category
- C++
- Title
- how to use max_element in c++ with vector
- Category
- C++
- Title
- Html tabulation
- Category
- C++
- Title
- dijkstra in c++
- Category
- C++
- Title
- log base 10 c+_+
- Category
- C++
- Title
- maximum possible number atmost k swaps
- Category
- C++
- Title
- int max in c++
- Category
- C++
- Title
- formal parameter c++
- Category
- C++
- Title
- how to find length of string in c++
- Category
- C++
- Title
- arrays in C++
- Category
- C++
- Title
- c++ method name
- Category
- C++
- Title
- how to make an array c++
- Category
- C++
- Title
- map arduino
- Category
- C++
- Title
- how to initialize a vector in c++
- Category
- C++
- Title
- solve linear equations geeksforgeeks
- Category
- C++
- Title
- c++ iterate over vector
- Category
- C++
- Title
- initialization list c++
- Category
- C++
- Title
- array sort c++
- Category
- C++
- Title
- ternary search c++
- Category
- C++
- Title
- Get handle in C++
- Category
- C++
- Title
- arduino delay millis
- Category
- C++
- Title
- remove value from vector c++
- Category
- C++
- Title
- pop from between string c++
- Category
- C++
- Title
- popualte an array c++
- Category
- C++
- Title
- how to decalre a string in c++
- Category
- C++
- Title
- bitset c++
- Category
- C++
- Title
- get data from terminal c++
- Category
- C++
- Title
- how to have a queue as a parameter in c++
- Category
- C++
- Title
- programa para saber si un numero es primo
- Category
- C++
- Title
- how to create a vector in c++
- Category
- C++
- Title
- how to dynamically allocate an array c++
- Category
- C++
- Title
- if vector contains value c++
- Category
- C++
- Title
- range based for loop c++
- Category
- C++
- Title
- making random numbers in c++
- Category
- C++
- Title
- never gonna give you up lyrics
- Category
- C++
- Title
- c++ typeid get type name
- Category
- C++
- Title
- variable sized arrays hackerrank solution in c++
- Category
- C++
- Title
- multiset c++
- Category
- C++
- Title
- size of a matrix c++
- Category
- C++
- Title
- heap in cpp stl
- Category
- C++
- Title
- char **
- Category
- C++
- Title
- std::iomanip c++
- Category
- C++
- Title
- pause the console c++
- Category
- C++
- Title
- hobo 8
- Category
- C++
- Title
- struct c++
- Category
- C++
- Title
- std::substring
- Category
- C++
- Title
- sorting of array in c++
- Category
- C++