So I know to print something in a loop, the code looks like this:
for(int I = 0; I < num; ++I)...
And to print an object vector:
for(Square sq : squares)...
(if I have a class Square and I create the object sq and squares is the name of the vector)
But how would I go about code if I want my output to look like:
square 1 area: 3 square 2 area: 6 square 3 area: 9
To be more clear: my question is, how do I incorporate "I" like in the first example in a loop where I'm printing objects?