My code is the following
int tmpCnt; if (name == \"Dude\") tmpCnt++;
Why is there an error Use of unassigned local variabl
Use of unassigned local variabl
The default value table only applies to initializing a variable.
Per the linked page, the following two methods of initialization are equivalent...
int x = 0; int x = new int();
In your code, you merely defined the variable, but never initialized the object.