newbie learning C++ and not understanding the problem I have trying to use setprecision(2) says setprecision(2) is undefined. If anyone could help I'd be most grateful.
#include <iostream>
#include <string>
using namespace std;
int main()
{
double price,shipping;
cout<<"Enter total price of of the order: "<<endl;
cin>>price;
if(price > 75)
shipping = 0;
else if(price > 50)
shipping = 5;
else if(price > 25)
shipping = 10;
else if(price > 0)
shipping = 15;
cout<<"Total price of order including shipping is: "<<fixed<<setprecision(2)
<<price + shipping<<endl;
return 0;
system("pause");
}