4th Mar 2018, 7:08 PM
Kovoran PLAY
Kovoran PLAY - avatar
11 Answers
0
oh oh silent you're right,who am I kidding I'm poor at cs
4th Mar 2018, 7:27 PM
᠌᠌Code X
᠌᠌Code X - avatar
+ 5
@Brains without the initial value which used to determine the type of variable?
4th Mar 2018, 7:24 PM
Vladislav Tikhiy (SILENT)
Vladislav Tikhiy (SILENT) - avatar
+ 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;"
4th Mar 2018, 7:21 PM
Vladislav Tikhiy (SILENT)
Vladislav Tikhiy (SILENT) - avatar
+ 4
or use "int div;" and in Calculator "div =" instead of "var div ="
4th Mar 2018, 7:23 PM
Vladislav Tikhiy (SILENT)
Vladislav Tikhiy (SILENT) - avatar
+ 3
@Brains I wrote confused post, don't worry.
4th Mar 2018, 7:27 PM
Vladislav Tikhiy (SILENT)
Vladislav Tikhiy (SILENT) - avatar
+ 1
the problem is in public Calculator(int): that parameter doesn't seem right to me,it has no identifier
4th Mar 2018, 7:25 PM
᠌᠌Code X
᠌᠌Code X - avatar
+ 1
edit::you defined a calculator function and in the main function you called "calc()" instead of "calculator()"
4th Mar 2018, 7:28 PM
᠌᠌Code X
᠌᠌Code X - avatar
+ 1
your variables sum,sub and div can only be used if an object of that class in created
4th Mar 2018, 7:30 PM
᠌᠌Code X
᠌᠌Code X - avatar
0
silent variables can be declared with "var" in cs.var tells the system to select the variables type based on its value
4th Mar 2018, 7:22 PM
᠌᠌Code X
᠌᠌Code X - avatar
0
@Brians, how can I fix it?
4th Mar 2018, 7:26 PM
Kovoran PLAY
Kovoran PLAY - avatar
0
I decided to use Only Main, but it writes, that it need non-static method.
4th Mar 2018, 7:35 PM
Kovoran PLAY
Kovoran PLAY - avatar