What's so hard about copy/paste and then using your compiler's hot key for formatting? In VC++ 6.0 just select the code you want to format and hit ALT+F8 and this
Code:
#include <iostream>
#include <string>
using namespace std;
int main()
{
string str;
cout<< "Enter a string: "<<flush;
getline( cin, str );
cout<< "You entered \"" << str << "\"" <<endl;
return 0;
}
magically becomes this
Code:
#include <iostream>
#include <string>
using namespace std;
int main()
{
string str;
cout<< "Enter a string: "<<flush;
getline( cin, str );
cout<< "You entered \"" << str << "\"" <<endl;
return 0;
}