Ok, easy question.
Not caring about the variable scope what is better (i.e. possibly in
memory allocation etc)
int someVar=0;
for (int i=0;i<1000;i++)
{
...
someVar++;
...
}
OR
for (int i=0;i<1000;i++)
{
...
int someVar=0;
someVar++;
...
}
Or it really doesnt make any difference at all?
Not caring about the variable scope what is better (i.e. possibly in
memory allocation etc)
int someVar=0;
for (int i=0;i<1000;i++)
{
...
someVar++;
...
}
OR
for (int i=0;i<1000;i++)
{
...
int someVar=0;
someVar++;
...
}
Or it really doesnt make any difference at all?
Comment