+ 2
Current context
I’m trying to initiate a method. What does it mean when an error says “Keyword void cannot be used in current context”? I’ve tried other keywords like “int”, or “static int”, but it doesn’t accept those either. It doesn’t consider it a method :/
5 Respuestas
+ 1
https://code.sololearn.com/cyJugWyg2M6l/?ref=app
its not finished
+ 1
You cannot declare a method in the main method.
https://code.sololearn.com/c9I9id6Qc1a9/?ref=app
0
Can you show use the code ?
0
i tried your code and i tried modifing mine but on both there are errors and warnings- stuff like num1 is declared but never used, and it STILL has a problem with the keyword void-even if its not in the main method
0
True.
Have a look at this.
https://code.sololearn.com/cpeQkO2vWefO