c++ program for user define manipulator - c program with parth patthar

c program with parth patthar

learn c and c++ in better way and with simple example.

Believe on your own logic

Saturday, November 24, 2018

c++ program for user define manipulator

/*user difine manuplater*/
#include<iostream.h>
#include<conio.h>
#include<iomanip.h>
ostream &data(ostream &d1)
{
d1<<setw(8);
d1<<setprecision(3);
d1<<setiosflags(ios::right);
d1<<setiosflags(ios::adjustfield);
d1<<setfill('+');
return d1;
};
int main()
{
clrscr();
float f=20.2236;
cout<<data<<f;
getch();
return 0;
}

No comments:

Post a Comment