I have function called firstRun()
, inside of it I have two defined booleans filesDeleted
and dirsDeleted
.
Also inside in function
Change your
bool filesDeleted;
bool dirsDeleted;
to
bool filesDeleted = false;
bool dirsDeleted = false;
These are local variables and they must be assinged before use them.
From 5.1.7 Local variables
A local variable is not automatically initialized and thus has no default value. For the purpose of definite assignment checking, a local variable is considered initially unassigned.