these setioflags and things are a little confusing to me. i tried ot write a progrm so i'd understand but it says its an undeclared identifier? and it says that setw is not a member of 'ostream_withassign'. heres my code
Code:
#include<iostream.h>
#include<iomanip.h>
void main()
{
int x;
int stockNum[2];
int quantity[2];
double Price[2];
for(x=1;x<2;++x)
{
cout<<"Enter Stock Number: ";
cin>>stockNum[x];
cout<<"Quantity: ";
cin>>quantity[x];
cout<<"Price: ";
cin>>Price[x];
}
cout<<"You Entered: "<<endl<<endl;
cout<<setioflags(ios::left)<<"Stock Number"<<setioflags(ios::right)<<setw(25)<<"Quantity"<<setw(40)<<setioflags(ios::right)<<"Price"<<endl;
for(x=1;x<2;++x)
cout<<setioflags(ios::left)<<stockNum[x]<<setioflags(ios::right)<<setw(25)<<quantity[x]<<cout.setw(40)<<setioflags(ios::right)<<Price[x]<<endl;
}