while reading many codes i have seen that the editor implements {} in the main() function or other functions other than mandatory ones. i will give an example:
int main(){
int num1, num2;
float num3;
{
std::cout << "Uploading ..." << std::endl;
num3=0.3;
}
num1 = 2;
num2=num1+2;
}
my question is what is the purpose of implementing { bla; bla; bla; } in the function? i mean this part:
{
std::cout << "Uploading ..." << std::endl;
num3=0.3;
}