//********************************************** //this test use function flags() to show flag's //stream settings //********************************************** #include using namespace std; //----------------------------------------------- void showFlags(){ ios::fmtflags f; long i; f=cout.flags(); for(i=0X4000;i;i=i>>1){ if(i & f) cout<<"1"; else cout<<"0"; } cout<<"\n"; } //================================================ int main(){ showFlags(); cout.setf(ios::showpoint|ios::showpos|ios::left|ios::right); showFlags(); return 0; }