0
Whatâs wrong?
11 Answers
0
oh oh silent you're right,who am I kidding I'm poor at cs
+ 5
@Brains without the initial value which used to determine the type of variable?
+ 4
try to remove "int" here
Calculator(int)
Calculator()
also, I didn't wrote code in CS before, but seems to me that you can't declare variables with "var" and without initial value.
try to remove "var div;"
+ 4
or use "int div;" and in Calculator "div =" instead of "var div ="
+ 3
@Brains I wrote confused post, don't worry.
+ 1
the problem is in public Calculator(int):
that parameter doesn't seem right to me,it has no identifier
+ 1
edit::you defined a calculator function and in the main function you called "calc()" instead of "calculator()"
+ 1
your variables sum,sub and div can only be used if an object of that class in created
0
silent variables can be declared with "var" in cs.var tells the system to select the variables type based on its value
0
@Brians, how can I fix it?
0
I decided to use Only Main, but it writes, that it need non-static method.