Mega Code Archive
Pad the field width with spaces and set the internal and showpos flags
#include
using namespace std;
int main()
{
cout << "Hello" << endl;
cout.width(12);
cout.fill(' ');
cout.setf(ios::showpos | ios::internal);
cout << 765.34 << endl;
return 0;
}