C++ Part 29
C++ Strings Part IIIf you didn't read the first part, you can find it here.
getline: may input spaces, as before.
e.g., getline(cin,s1) would assign “Navid Plus” to s1 in the "Navid Plus" example.
#include <iostream>// Coded by https://NavidPlus.blogspot.com#include <string>
using namespace std;
int main ( )
cout << "What ever your going to write here, I will reverse it. " <<endl;
int theIndex = backString.length()-1;
while ( theIndex >= 0)
cout << backString [theIndex] ;
cout << '\n' ;