I am getting this error when compiling my program with quincy:
Error: I value required as left operand of assignment
Tthe program is meant to calculate how much parking costs based on the amount of hours in a park and what type of vehicle it is. the error is coming from my function definitions which i have just started to add in.
the error is on line 72 which is:Code:float calcCarCost (char vehicletype, int time, float car) { if ((time > MINTIME) && (time <= 3)) calcCarCost =( CAR * time ); }
calcCarCost =( Car * time);
i should probably point out CAR is already defined as a constant with a numerical value given and time is previously asked to be input in when the program runs.
i am pretty new to programming in general which is probably pretty obvious by now and im just wondering what is causing the problem. If any more information is needed just ask. Thanks in advance