int bla(int, int, int, int);
bla
function expects int
arguments but
double n = bla(sum, budget, bet, new_budget);
you are passing sum
as a parameter which is a function. As your sum
function returns an int
, you can pass it as sum()
double n = bla(sum(), budget, bet, new_budget);
Side Note: Inside sum
function you have declared a variable named sum
. Avoid using same name for a function and a variable. It causes ambiguity.
solved “argument of type ”int(*)()“ is incompatible with parameter of type int” error?