When I define a for loop like so:
Is the condition only called once?
For example:
Would foo() be called several times, or only once?
Sidenote: I know I could easily test this but it's bugging me and I do not currently have a compiler.
Code:
for(initialize; condition; increment)
{
//code
}
For example:
Code:
for(unsigned int i = 0; i < foo(); i++)
{
//code
}
Sidenote: I know I could easily test this but it's bugging me and I do not currently have a compiler.
Comment