I was writing something like this code:
do {
int i = 0;
int j = i * 2;
cout<<j;
i++;
} while (j < 100);
and I was surprised when my compiler told me that I cannot use the variable 'j' because it is not declared outside the do-while loop.
I am just curious about if there is any technical reason why this cant be possible.