cout command unrecognized

Doing a c++ introductory class and my cout command is unrecognized i try to run it. it says tipCalc.cpp:15:13: note: ‘std::ostream {aka std::basic_ostream<char>}’ is not derived from ‘std::basic_istream<_CharT, _Traits>’
cout >> "Enter the amount of the bill before tax";



[code]
//tipCalc.cpp -- calculate bill plus tip
//Blake Benson, Professor Fowler, 1/27/2016
//cisp 360
#include <iostream>
using namespace std;

int main ()
{
cout << "This program provides the user with multiple tip otions. /n";
}

//Bonus -- wrap input code4 in its own function
double billAmount ()
{
cout >> "Enter the amount of the bill before tax";
double bill
cin >> bill;
return bill
}

wait just realized the mistake I think
when using cout, always use it with <<, not this >>. >> is the extraction operator, which you don't want

Also, your [code] tag needs to be ended with the corresponding [ /code] tag, without the space between the [ and the /
Last edited on
Topic archived. No new replies allowed.