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
See this thread concerning uninitialized bools, but it should answer your question.
Local variables are not initialized unless you call their constructors (new) or assign them a value.