0

enter image description here

I am unable to resolve this error plz help me out? What to do? how to resolve this issue?

  • You need **count** to be a global variable – null_override Sep 08 '20 at 17:34
  • Please read [How do I ask a good question?](https://stackoverflow.com/help/how-to-ask) and [How to create a Minimal, Reproducible Example](https://stackoverflow.com/help/minimal-reproducible-example) and especially you shouldn't post code as an image. Code fragments should be included as text so everybody can copy and paste it to their own IDE. – vanje Sep 08 '20 at 17:40

1 Answers1

0

count is declared inside the scope of the loop, so it is not accessible by the outside. you need to declare it as a local variable (in the scope of the entire class).

Ralph Aouad
  • 414
  • 4
  • 10