Ok, I am sort of new to C++, and I just came across something that I don't fully understand.
int main(){
int iX=5;
{
int iY=30;
std::cout<<iY<<std::endl;
}
std::cout<<iX<<std::endl;
return 0;
}
What does it mean when I make a code block with no if,else etc..? Does it just make the variables inside local to that block? How would you use this?
Thanks.