#include <iostream>
using std::cout;
using std::cin;
using std::endl;
int main()
{
//declare variables
double beginningBalance = 0.0;
double deposit = 0.0;
double withdrawal = 0.0;
double endingBalance = 0.0;
//enter input items
cout << "Enter your beginning balance: ";
cin >> beginningBalance;
cout << "Enter your deposit amount: ";
cin >> deposit;
cout << "Enter your withdrawal amount: ";
cin >> withdrawal;
//calculate ending balance
endingBalance = beginningBalance + deposit - withdrawal;
//display output items
cout >> "Your ending balance is $" << endingBalance << endl;
return 0;
} // end of main function
this is the error the compiler says:
1>------ Build started: Project: Ch3AppE04 Project, Configuration: Debug Win32 ------
1>Compiling...
1>Ch3AppE04.cpp
1>c:\users\jeremy\my dropbox\florida tech online\summer 2 2009\c++\chap3 homework and lesson work\ch3appe04 solution\ch3appe04 project\ch3appe04.cpp(32) : error C2784: 'std::basic_istream<char,_Traits> &std::operator >>(std::basic_istream<char,_Traits> &,unsigned char &)' : could not deduce template argument for 'std::basic_istream<char,_Traits> &' from 'std::ostream'
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(1021) : see declaration of 'std::operator >>'
1>c:\users\jeremy\my dropbox\florida tech online\summer 2 2009\c++\chap3 homework and lesson work\ch3appe04 solution\ch3appe04 project\ch3appe04.cpp(32) : error C2784: 'std::basic_istream<char,_Traits> &std::operator >>(std::basic_istream<char,_Traits> &,unsigned char &)' : could not deduce template argument for 'std::basic_istream<char,_Traits> &' from 'std::ostream'
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(1021) : see declaration of 'std::operator >>'
1>c:\users\jeremy\my dropbox\florida tech online\summer 2 2009\c++\chap3 homework and lesson work\ch3appe04 solution\ch3appe04 project\ch3appe04.cpp(32) : error C2784: 'std::basic_istream<char,_Traits> &std::operator >>(std::basic_istream<char,_Traits> &,unsigned char &)' : could not deduce template argument for 'std::basic_istream<char,_Traits> &' from 'std::ostream'
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(1021) : see declaration of 'std::operator >>'
1>c:\users\jeremy\my dropbox\florida tech online\summer 2 2009\c++\chap3 homework and lesson work\ch3appe04 solution\ch3appe04 project\ch3appe04.cpp(32) : error C2784: 'std::basic_istream<char,_Traits> &std::operator >>(std::basic_istream<char,_Traits> &,unsigned char &)' : could not deduce template argument for 'std::basic_istream<char,_Traits> &' from 'std::ostream'
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(1021) : see declaration of 'std::operator >>'
1>c:\users\jeremy\my dropbox\florida tech online\summer 2 2009\c++\chap3 homework and lesson work\ch3appe04 solution\ch3appe04 project\ch3appe04.cpp(32) : error C2784: 'std::basic_istream<char,_Traits> &std::operator >>(std::basic_istream<char,_Traits> &,unsigned char *)' : could not deduce template argument for 'std::basic_istream<char,_Traits> &' from 'std::ostream'
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(1014) : see declaration of 'std::operator >>'
1>c:\users\jeremy\my dropbox\florida tech online\summer 2 2009\c++\chap3 homework and lesson work\ch3appe04 solution\ch3appe04 project\ch3appe04.cpp(32) : error C2784: 'std::basic_istream<char,_Traits> &std::operator >>(std::basic_istream<char,_Traits> &,unsigned char *)' : could not deduce template argument for 'std::basic_istream<char,_Traits> &' from 'std::ostream'
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(1014) : see declaration of 'std::operator >>'
1>c:\users\jeremy\my dropbox\florida tech online\summer 2 2009\c++\chap3 homework and lesson work\ch3appe04 solution\ch3appe04 project\ch3appe04.cpp(32) : error C2784: 'std::basic_istream<char,_Traits> &std::operator >>(std::basic_istream<char,_Traits> &,unsigned char *)' : could not deduce template argument for 'std::basic_istream<char,_Traits> &' from 'std::ostream'
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(1014) : see declaration of 'std::operator >>'
1>c:\users\jeremy\my dropbox\florida tech online\summer 2 2009\c++\chap3 homework and lesson work\ch3appe04 solution\ch3appe04 project\ch3appe04.cpp(32) : error C2784: 'std::basic_istream<char,_Traits> &std::operator >>(std::basic_istream<char,_Traits> &,unsigned char *)' : could not deduce template argument for 'std::basic_istream<char,_Traits> &' from 'std::ostream'
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(1014) : see declaration of 'std::operator >>'
1>c:\users\jeremy\my dropbox\florida tech online\summer 2 2009\c++\chap3 homework and lesson work\ch3appe04 solution\ch3appe04 project\ch3appe04.cpp(32) : error C2784: 'std::basic_istream<char,_Traits> &std::operator >>(std::basic_istream<char,_Traits> &,signed char &)' : could not deduce template argument for 'std::basic_istream<char,_Traits> &' from 'std::ostream'
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(1007) : see declaration of 'std::operator >>'
1>c:\users\jeremy\my dropbox\florida tech online\summer 2 2009\c++\chap3 homework and lesson work\ch3appe04 solution\ch3appe04 project\ch3appe04.cpp(32) : error C2784: 'std::basic_istream<char,_Traits> &std::operator >>(std::basic_istream<char,_Traits> &,signed char &)' : could not deduce template argument for 'std::basic_istream<char,_Traits> &' from 'std::ostream'
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(1007) : see declaration of 'std::operator >>'
1>c:\users\jeremy\my dropbox\florida tech online\summer 2 2009\c++\chap3 homework and lesson work\ch3appe04 solution\ch3appe04 project\ch3appe04.cpp(32) : error C2784: 'std::basic_istream<char,_Traits> &std::operator >>(std::basic_istream<char,_Traits> &,signed char &)' : could not deduce template argument for 'std::basic_istream<char,_Traits> &' from 'std::ostream'
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(1007) : see declaration of 'std::operator >>'
1>c:\users\jeremy\my dropbox\florida tech online\summer 2 2009\c++\chap3 homework and lesson work\ch3appe04 solution\ch3appe04 project\ch3appe04.cpp(32) : error C2784: 'std::basic_istream<char,_Traits> &std::operator >>(std::basic_istream<char,_Traits> &,signed char &)' : could not deduce template argument for 'std::basic_istream<char,_Traits> &' from 'std::ostream'
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(1007) : see declaration of 'std::operator >>'
1>c:\users\jeremy\my dropbox\florida tech online\summer 2 2009\c++\chap3 homework and lesson work\ch3appe04 solution\ch3appe04 project\ch3appe04.cpp(32) : error C2784: 'std::basic_istream<char,_Traits> &std::operator >>(std::basic_istream<char,_Traits> &,signed char *)' : could not deduce template argument for 'std::basic_istream<char,_Traits> &' from 'std::ostream'
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(1000) : see declaration of 'std::operator >>'
1>c:\users\jeremy\my dropbox\florida tech online\summer 2 2009\c++\chap3 homework and lesson work\ch3appe04 solution\ch3appe04 project\ch3appe04.cpp(32) : error C2784: 'std::basic_istream<char,_Traits> &std::operator >>(std::basic_istream<char,_Traits> &,signed char *)' : could not deduce template argument for 'std::basic_istream<char,_Traits> &' from 'std::ostream'
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(1000) : see declaration of 'std::operator >>'
1>c:\users\jeremy\my dropbox\florida tech online\summer 2 2009\c++\chap3 homework and lesson work\ch3appe04 solution\ch3appe04 project\ch3appe04.cpp(32) : error C2784: 'std::basic_istream<char,_Traits> &std::operator >>(std::basic_istream<char,_Traits> &,signed char *)' : could not deduce template argument for 'std::basic_istream<char,_Traits> &' from 'std::ostream'
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(1000) : see declaration of 'std::operator >>'
1>c:\users\jeremy\my dropbox\florida tech online\summer 2 2009\c++\chap3 homework and lesson work\ch3appe04 solution\ch3appe04 project\ch3appe04.cpp(32) : error C2784: 'std::basic_istream<char,_Traits> &std::operator >>(std::basic_istream<char,_Traits> &,signed char *)' : could not deduce template argument for 'std::basic_istream<char,_Traits> &' from 'std::ostream'
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(1000) : see declaration of 'std::operator >>'
1>c:\users\jeremy\my dropbox\florida tech online\summer 2 2009\c++\chap3 homework and lesson work\ch3appe04 solution\ch3appe04 project\ch3appe04.cpp(32) : error C2784: 'std::basic_istream<_Elem,_Traits> &std::operator >>(std::basic_istream<_Elem,_Traits> &,_Elem &)' : could not deduce template argument for 'std::basic_istream<_Elem,_Traits> &' from 'std::ostream'
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(975) : see declaration of 'std::operator >>'
1>c:\users\jeremy\my dropbox\florida tech online\summer 2 2009\c++\chap3 homework and lesson work\ch3appe04 solution\ch3appe04 project\ch3appe04.cpp(32) : error C2784: 'std::basic_istream<_Elem,_Traits> &std::operator >>(std::basic_istream<_Elem,_Traits> &,_Elem &)' : could not deduce template argument for 'std::basic_istream<_Elem,_Traits> &' from 'std::ostream'
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(975) : see declaration of 'std::operator >>'
1>c:\users\jeremy\my dropbox\florida tech online\summer 2 2009\c++\chap3 homework and lesson work\ch3appe04 solution\ch3appe04 project\ch3appe04.cpp(32) : error C2784: 'std::basic_istream<_Elem,_Traits> &std::operator >>(std::basic_istream<_Elem,_Traits> &,_Elem &)' : could not deduce template argument for 'std::basic_istream<_Elem,_Traits> &' from 'std::ostream'
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(975) : see declaration of 'std::operator >>'
1>c:\users\jeremy\my dropbox\florida tech online\summer 2 2009\c++\chap3 homework and lesson work\ch3appe04 solution\ch3appe04 project\ch3appe04.cpp(32) : error C2784: 'std::basic_istream<_Elem,_Traits> &std::operator >>(std::basic_istream<_Elem,_Traits> &,_Elem &)' : could not deduce template argument for 'std::basic_istream<_Elem,_Traits> &' from 'std::ostream'
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(975) : see declaration of 'std::operator >>'
1>c:\users\jeremy\my dropbox\florida tech online\summer 2 2009\c++\chap3 homework and lesson work\ch3appe04 solution\ch3appe04 project\ch3appe04.cpp(32) : error C2784: 'std::basic_istream<_Elem,_Traits> &std::operator >>(std::basic_istream<_Elem,_Traits> &,_Elem *)' : could not deduce template argument for 'std::basic_istream<_Elem,_Traits> &' from 'std::ostream'
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(934) : see declaration of 'std::operator >>'
1>c:\users\jeremy\my dropbox\florida tech online\summer 2 2009\c++\chap3 homework and lesson work\ch3appe04 solution\ch3appe04 project\ch3appe04.cpp(32) : error C2784: 'std::basic_istream<_Elem,_Traits> &std::operator >>(std::basic_istream<_Elem,_Traits> &,_Elem *)' : could not deduce template argument for 'std::basic_istream<_Elem,_Traits> &' from 'std::ostream'
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(934) : see declaration of 'std::operator >>'
1>c:\users\jeremy\my dropbox\florida tech online\summer 2 2009\c++\chap3 homework and lesson work\ch3appe04 solution\ch3appe04 project\ch3appe04.cpp(32) : error C2784: 'std::basic_istream<_Elem,_Traits> &std::operator >>(std::basic_istream<_Elem,_Traits> &,_Elem *)' : could not deduce template argument for 'std::basic_istream<_Elem,_Traits> &' from 'std::ostream'
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(934) : see declaration of 'std::operator >>'
1>c:\users\jeremy\my dropbox\florida tech online\summer 2 2009\c++\chap3 homework and lesson work\ch3appe04 solution\ch3appe04 project\ch3appe04.cpp(32) : error C2784: 'std::basic_istream<_Elem,_Traits> &std::operator >>(std::basic_istream<_Elem,_Traits> &,_Elem *)' : could not deduce template argument for 'std::basic_istream<_Elem,_Traits> &' from 'std::ostream'
1> c:\program files\microsoft visual studio 9.0\vc\include\istream(934) : see declaration of 'std::operator >>'
1>c:\users\jeremy\my dropbox\florida tech online\summer 2 2009\c++\chap3 homework and lesson work\ch3appe04 solution\ch3appe04 project\ch3appe04.cpp(32) : error C2676: binary '>>' : 'std::ostream' does not define this operator or a conversion to a type acceptable to the predefined operator
1>Build log was saved at "file://c:\Users\Jeremy\My Dropbox\Florida Tech Online\Summer 2 2009\C++\Chap3 homework and lesson work\Ch3AppE04 Solution\Ch3AppE04 Project\Debug\BuildLog.htm"
1>Ch3AppE04 Project - 25 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

New Topic/Question
Reply


MultiQuote





|