what am I missing here? anyhelp will be appreciated. Thanks [Error] void value n
ID: 3574369 • Letter: W
Question
what am I missing here? anyhelp will be appreciated.
Thanks
[Error] void value not ignored as it ought to be
[Error] lvalue required as left operand of assignment
void sell coffee ()3 void shop menu(); void total cups sold int cups sold 31) void total cups sold int cups sold [3]) void total money made int cups sold[3], double s, double m, d int main(void) const double SMALL CUP COST 1.75 const double MEDIUM CUP COST 1.90 const double LARGE CUP COST 2.00 int cups [3] te sold int choice, cup size no cups information do shop menu cin choice switch (choice Case H sell coffee Cu Size if (cup size 4)Explanation / Answer
sell_coffee(); is a function which returns void nothing, but u r tryingto assign it to cup_size which is an integer so u r getting this error.
Please change the return type of sell_coffee() function to int in its prototype and definition.
int sell_coffee();
instead of void sell_coffee();
Also sell_coffee() should return an integer value which can be assigned to cup_size.
cup_size=sell_coffee();
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.