| | |
Linker Errors
Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Oct 2007
Posts: 60
Reputation:
Solved Threads: 0
Hello everyone. Happy New Year. I've been going over last semester's book and have found that I've already allowed the basics to run away! We ended with classes, so I've gone back to just doing exercises with basic functions and I keep getting a linker on this one.:
Takes input for the amount a consumer needs to borrow(in-pocket), the interest rate, and duration of loan in months. Program should calculate the "face value" of loan (with interest) as well as monthly payment. Please excuse my sloppy code, I just don't see this:
Takes input for the amount a consumer needs to borrow(in-pocket), the interest rate, and duration of loan in months. Program should calculate the "face value" of loan (with interest) as well as monthly payment. Please excuse my sloppy code, I just don't see this:
C++ Syntax (Toggle Plain Text)
#include <iostream> using namespace std; double paid_out, rate, time, interest, in_pocket, months, monthly_payment; double loan_value(double rate, double time, double interest, double in_pocket); double payment(double monthly, double paid_out); double loan_value( double rate, double time, double interest, double in_pocket) { paid_out = (in_pocket) / (1 - rate * time); return 0; } double payment(double months, double paid_out) { monthly_payment = (paid_out / months); return 0; }
Last edited by Ancient Dragon; Jan 3rd, 2008 at 1:45 pm. Reason: corrected code tags
What linker errors are you getting? You have just declared the function
paidout() but not defined it. And perhaps you have called it somewhere else. Also if you think thats the whole program then its wrong, you haven't written main function. That too could be a cause. Last edited by vishesh; Jan 3rd, 2008 at 1:34 pm.
•
•
Join Date: Oct 2007
Posts: 60
Reputation:
Solved Threads: 0
Thanks. Yes, I was trying to develop a new habit of checking for errors as I proceed, debugging as you go, because I had a bad habit of tying to write the whole thing and then the errors would be too overwhelming. Can I do this somehow without calling the functions in a main? Or won't that be possible?
Thanks
RG
Thanks
RG
![]() |
Similar Threads
- linker errors in MSVC++ 2005 (C++)
- Linker Error (C++)
- Dev C++ linker errors, undefined reference (C++)
- DEV-C++ linker errors (C++)
- Dev-C++, GLUI linker error, undefined reference (C++)
- Please Check The Errors'..Dont know what else to do (C++)
Other Threads in the C++ Forum
- Previous Thread: Custom exception - throw-delay
- Next Thread: system to text file
| Thread Tools | Search this Thread |
api array arrays based beginner binary bitmap c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete deploy developer dll download dynamiccharacterarray email encryption error file forms fstream function functions game generator getline givemetehcodez graph homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib 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 struct temperature template text tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






