You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ans - It depends. Rule - Whenever we try to access something, locals are checked first (afais-een). If enum value and variable are in same scope, then an error is guarantied. But they are in different scopes, then no (compiler) errors for this reason; but you may expect the unexpected behaviors; while coding you may think that you're trying to access a global variable or global enum value, it might have picked local enum value or variable with same name. To avoid this issue, enum are (most-ly 🤔) suffixed with _e in standard headers. Like in the case of datatypes being appended with _t.
The text was updated successfully, but these errors were encountered:
Ans - It depends. Rule - Whenever we try to access something, locals are checked first (afais-een). If
enum
value and variable are in same scope, then an error is guarantied. But they are in different scopes, then no (compiler) errors for this reason; but you may expect the unexpected behaviors; while coding you may think that you're trying to access a global variable or globalenum
value, it might have picked localenum
value or variable with same name. To avoid this issue,enum
are (most-ly 🤔) suffixed with_e
in standard headers. Like in the case of datatypes being appended with_t
.The text was updated successfully, but these errors were encountered: