I keep getting the below errors in this training c++ program that converts dollars to 'DWORKS' from the minimum to the maximum dollars entered. Any ideas?
errors:
error C2593: 'operator <<' is ambiguous
error C2593: 'operator <<' is ambiguous
error C3861: 'setiosflags': identifier not found, even with argument-: error C3861: 'setprecision': identifier not found, even with argument-dependent lookup
error C3861: 'setw': identifier not found, even with argument-dependent lookup
error C3861: 'setw': identifier not found, even with argument-dependent lookup
//This program converts Dollars to DWORKS.
#include <iostream>
#include <iomanip>
#include <stdafx.h>
using namespace std;
int main()
{
double mindollars,counter;
double maxdollars;
const double step=.025;
const float dworksToDollar=27.00;
cout << setiosflags(ios::fixed) << setprecision(2);
cout<<"Enter mindollars to convert to DWORKS:\n";
cin>>mindollars;
cout<<"Enter maxdollars to convert to DWORKS:\n";
cin>>maxdollars;
cout << " Exchange Rates\n"; //You are to display the exchange rate (27 to 1) at the top of the table
cout << " Dollars DWORKS\n";
cout << " ------- ------\n";
for (counter=mindollars;counter<maxdollars; counter=counter+step)
cout << setw(9) << mindollars << " " << setw(10) << (counter*dworksToDollar) << " \n";
system("pause");
return 0;
}