anyone out there let me know what the script is to align an output to the right: setw(4)setiosflags(left) ect.. i know this is wrong.. looking for the right script.. thanks
anyone out there let me know what the script is to align an output to the right: setw(4)setiosflags(left) ect.. i know this is wrong.. looking for the right script.. thanks
#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
int a =100,b=200;
cout<<setw(4)<<right<<a<<setw(4)<<left<<b<<flush;
return 0;
}
Free the weed!! Class B to class C is not good enough!!
And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi
thanks stoned.. worked sweet
This code doesn't work for me, is this compiler dependant or standard?