problems pointing to an array

So I'm trying to call the balance of an account in my program with
balance = accounts_[i].GetBalance(0;
Now if I substitute i with 0 which is the actual position of the value I'm currently looking for and that I learn by std::cout << index the program will work but only for the zero element of the array. What can I do to make this more universal.
I've tried i = index but I get i:undeclared identifier and left of .GetBalance must have class/struct/union.
How can I put the location found by index into an integer and please this .GetBalance.

it wasn't working earlier but balance = accounts_[index].GetBalance() seems to be working fine.
Topic archived. No new replies allowed.