#include<iostream>
#include<string>
using namespace std;
int man(){
	string s;
	cout<<"Type something...\n";
	getline(cin,s);
	string::iterator pos;
	for(pos=s.end();pos!=s.begin()-1;pos){
	out<<*pos;
	}

The code does not even compile. Please verify that the code works before posting it. Next time such imcomplete codes will be deleted...

This time I am ediiting so that it just works..

#include<iostream>
#include<string>
using namespace std;

int main()
{
    string s;
    cout<<"Type something...\n";
    getline(cin,s);
    string::iterator end = s.end( ) - 1;

    for( ; end != s.begin( ) - 1; end--)
    {
        cout << *end;
    }
    return 0 ;
}