for (int foo(0);foo<t_max;++foo)
{
for (int goo?;goo<t_max;++goo)
{
do stuff
}
do stuff
}
I want goo to start each of its iterations with foo (outer loop)
So you would see the following:
1 (foo)
1->t_max (goo)
2 (foo)
2->t_max (goo)
3 (foo)
3->t_max (goo)
The problem is trying to initialize the variable in for loop goo.
e.g. for (int goo(foo); goo<tmax; ++goo) !!!error
{
do stuff
}
get an error that goo(foo) "cannot be used as a function".
How do I nest this loop? I could try a while loop, but I want to make sure Ii am not overlooking something with for loop. It seems you can only initialize the loop with literals and not symbols.