vector::iterator = int high;

How come I cant say, when i have for example this vector iterator;

1
2
int high = 3;
vector<TEAM>::iterator = high


it says:

C:\Documents and Settings\XAN DIET VINIE\My Documents\XANDER\Programmeren\Papa Poulefase\main.cpp|142|error: conversion from 'int' to non-scalar type '__gnu_cxx::__normal_iterator<TEAM*, std::vector<TEAM, std::allocator<TEAM> > >' requested|
because interators are not indexes.

you can do this though:

 
vector<TEAM>::iterator i = myvector.begin() + high;
Oh thanks!
Topic archived. No new replies allowed.