variable scope in statement blocks
By my understanding of scope, the first example should be fine. Your understanding of scope is fine. This is not a scoping error. It is an inconsistent use of simple name error. int i = 10; // error, ‘i’ already exists That is not the error that is reported. The error that is reported is … Read more