Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
-5 votes
1 answer
1k views

How do I manage multiple nested for-loops without using multiple variables?

If I have code that looks like this: int i; void functionA (){ for (i=0; i<10; i++){ functionB(); } } void functionB (){ for (i=0; i<20; i++){ doSomething(); } } ...
Noah Smith's user avatar