Newbie needs help with basic program: Ambiguous Overload for "operator>>' in 'std::cin>>"variable"

Here is my program which will not compile:
---------------------------------------------------
//9/29/2011
//Assignment 3
//Program for computing the total cost of a window molding design

#include <iostream>
using namespace std;


int main()
{
//declare variables;
double circleDiam=0.0;
double sideLength=0.0;
double costPerFoot=0.0;
double circleFt =0.0;
double squareFt=0.0;
double totalFt=0.0;
double cost=0.0;
double totalCost=0.0;
const double TAXRATE=1.08;
const double PI =3.1415;

//enter input items
cout << "Length of 1 side of square? ";
cin >> "sideLength";
cout << "Diameter of circle? ";
cin >> "circleDiam";
cout << "Cost per linear foot? ";
cin >> "costPerFoot";

//calculate total linear feet and cost;
circleFt = (PI * circleDiam) / 2;
squareFt = sideLength * 4;
totalFt = circleFt + squareFt;
cost = totalFt * costPerFoot;
totalCost = cost * TAXRATE;

//display the total linear feet and the total cost;
cout << "Total linear feet: " << totalFt;
cout << "Total: $" << totalCost << endl;

} //end of main function
---------------------------------------------------

COMPILER:

Line27: ambiguous overload for 'operator>>' in 'std::cin >> "sideLength"' - what does this even mean??

note: candidates are: std::basic_istream<char, _Traits>& std::operator>> (std::basic_istream<char, _Traits>&, unsigned char*) [with _Traits = std::char_traits<char>] <near match>

Line29: same error for same operator in 'std::cin >> "circleDiam"'
note: same candidates

Line 31: same error for same operator in 'std::cin >> "costPerFoot"'
note: same candidates



--------------------------------------------------------------


I am using Bloodshed Dev-C++ , if that matters, and I am very new to this and not sure what is missing here.

Any help would be GREATLY appreciated.


Instructions for this program:
Builders, Inc. needs a program that allows the company's salesclerks to compute the cost of a special window molding they make and sell. It is for double windows that consist of a half-circle shaped window and a square window.

The top part is a half-circle, the bottom is a square. They may be 2 different sizes, as shown (not shown). Molding is to be placed over all lines - i.e. 4 sides of a square, 1 curved top and its' straight bottom.

The user should be prompted to enter the half-circle diameter (D) in feet, the square side length (L) in feet and the cost per foot of the railing. The total linear feet should be computed, along with the total cost which is to include an 8% sales tax. Total linear feet and total cost are to then be output and the program should stop.

Notes for this program:
All inputs may include decimals.
Use 3.1415 for the value of PI, as a constant.
Display total linear feet with 2 decimal places.
Display total cost with a dollar sign and 2 decimal places.
-ase
Last edited on
remove the quotes in cin lines
1
2
3
4
5
6
7
//enter input items
cout << "Length of 1 side of square? ";
cin >> sideLength;
cout << "Diameter of circle? ";
cin >> circleDiam;
cout << "Cost per linear foot? ";
cin >> costPerFoot;
Topic archived. No new replies allowed.