Can a variable be declared within a function with the same name if it's within the brackets of an if statement?
1 2 3 4 5 6 7 8 9 10 11 12
|
like
function()
{
int a
if a = 12 {
int a
}
}
|
Last edited on
Yes, however it is not a wise thing to do, you will soon get confused about witch a you are using.