Mega Code Archive
Printing an integer with internal spacing and plus sign
#include
using std::cout;
using std::endl;
using std::internal;
using std::showpos;
#include
using std::setw;
int main()
{
cout << internal << showpos << setw( 10 ) << 123 << endl;
return 0;
}
+ 123