+ 1
Error when calling a function
The function works just fine, but when I try to call the function in the driver part of the code (main) I get an 2 errors on line 13 expected expression before float and too few arguments to function input. input(float sales, int i); ^~~~~ input(float sales, int i); ^~~~~ https://code.sololearn.com/cOi8WCHOL15l/?ref=app
1 Answer
+ 3
You mustn't use data types when calling a function, but when declaring it:
void test(int a) { // declaring test
code...
}
int i = 0;
test(i); // calling test
Btw. I tried to fix your code a little bit:
https://code.sololearn.com/cm3JiiSnrxsu/?ref=app