| | |
Could not deduce template argument...
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Oct 2009
Posts: 43
Reputation:
Solved Threads: 0
So I am trying to write a program that will give creditcard balance information and it is aparent when I compile that there is some sort of error ( error c2784 ). I think that I might not be including something that I need but I am not sure what it is. Everything else seems to be fine but I cant figure this out for the life of me. Any ideas?
Thanks
Thanks
C++ Syntax (Toggle Plain Text)
# include <iostream> # include <fstream> # include <cstdlib> # include <string> # include <cmath> using namespace std; int main () { double balance, interest, minpayment; int month(0); cout << " Enter your account balance: " << endl; cin >> balance; do { if (balance <= 1000) { interest = balance * .015; balance = balance * 1.015; } else { interest = balance * .01; balance = balance * 1.01; } if (balance <= 10) { minpayment = balance; } else if (balance * .1 < 10) { minpayment = 10; } else { minpayment = balance * .1; } month = month++; cout << " Month " << month << endl; cout << " Interest is: " << interest << endl; cout << " Account balance is: " << balance << endl; cout << " Minimum payment is: " << minpayment << endl; cout >> " Would you like to see the next months figures? Y/y or N/n " << endl; char yesorno; cin << yesorno; } while (yesorno == y); return(0); }
1
#2 Oct 7th, 2009
there is a lot of logic errors, but this one is a compile time error :
you mean cin >> yesorno , right.
C++ Syntax (Toggle Plain Text)
cin << yesorno;
you mean cin >> yesorno , right.
I give up! 1) What word becomes shorter if you add a letter to it? [ Solved by : niek_e ] 2) What does this sequence equal to : (.5u - .5a)(.5u-.5b)(.5u-.5c) ... 3) What is the 123456789 prime numer? Ask4Answer
![]() |
Similar Threads
- Force template argument to derive from a given class (C++)
- template object as function parameter (C++)
- Help on stack , queue, palindrome program... (C++)
- Help Needed on C++ assignment (C++)
- Classes and Drivers (C++)
- Average Grade - Functions w/istreams & fstreams (C++)
- please help the new kid (C++)
- Help, Won't Run (C++)
- compilation errors (C++)
- vc++ mfc-i can't make getline work with a string for file input (C++)
Other Threads in the C++ Forum
- Previous Thread: Loan Payment Program
- Next Thread: Deleted memory still accessible?
| Thread Tools | Search this Thread |
api array arrays based beginner binary bitmap c++ c/c++ calculator char char* class code coding compile compiler console conversion count data database delete deploy developer dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game getline givemetehcodez graph gui homeworkhelp homeworkhelper iamthwee ifstream input int java lib linker list loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference rpg sorting string strings temperature template test text text-file tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






