Chat on IRC |
C++ supreme newbie question
Posted by diegoeskryptic [send private reply] at April 18, 2002, 05:21:38 PM
There is an error in here sumwhere but I just cant seem to find it: void printBill(int num_of_days, double room_cost, const double &telephone_charge, const double &television_charge, double totalDue){.... Here's what the error says:
E:\vcpp\Hospital\hospital.cpp(98) : error C2601: 'printBill' : local function definitions are illegal... I've checked this program over and over to make sure all the variables were in the right place but i still cant fix the problem.... please help me!
Posted by Psion [send private reply] at April 18, 2002, 08:52:39 PM
The great thing about error messages is that they tell you what you've done wrong. This one tells you that you are trying to define a function inside another function, which is not allowed. If you don't think you're trying to do this, then check for missing/extra {}'s, etc..
Register as a new user | ||||