Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Program_1_rstring
//Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23506 for x64 #include <iostream> using namespace std; void RevS(string &str){ int A=str.length(); // check the length of the string for (int i=0;i<n/2;i++) // loop for the order swap(str[i],str[n-i-1]); } int main() { std::cout << "Hello, world!\n"; string str="ABCD"; RevS(str); std::cout << str; return 0; }
run
|
edit
|
history
|
help
0
Use std::is_base_of to subset STL container contents.
Additional layer of indirection
Type deduction in VC++
VS'15 parameter pack sfinae
Arrays
C++ exception
VC++
unresolved external symbol
hangman
Zero length array as a class member