invalid conversion from int to int and more errors

I wrote a code and I have some errors that I have no idea how to fix.
Write a program that accepts input like the program in Display 7.8
and that outputs a bargraph like the one in that display except your
program will output the bars vertically rather than horizontally.
A two-dimensional array may be useful

1
2
fixed
Last edited on
Line 25 is not compatible with line 13. In the definition inputsales takes two integer arrays as parameters, while on line 25 you pass an integer array and an integer (not array)
Okay I fixed my errors, but there's still one error left.
Line 77 floor is not declared in the scope.
You need to #include<cmath> .
When I include cmath, I get more errors.

Line 17: new declaration int round (double)
You are getting this because <cmath> already has a function called "round", which takes a double as the sole parameter value. The way to solve this is either to use the "round" already supplied by <cmath>, or to rename your "round" function to be something else. Of course, you could also just remove <cmath> altogether and write your own "floor" function.
Oh, I got it. Thanks.
Topic archived. No new replies allowed.