Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Problem programmer?

Name: Anonymous 2011-04-20 14:49

in main:

vector<int> player_nr;
int x = menu(player_nr.begin());

menu function:

int menu(vector<int>::iterator x)
{
...
int a = x->size(); //<---- complains here
...
}

As far as I understood it Vectors have the arrow-operator defined in C++. Then why the fuck does the compilator complain of it?

Name: Anonymous 2011-04-20 15:43

>>5

Which is why I use the arrow-operator (->) to use the "size()" function on the vector instead of on the iterator. Did I missunderstand how this works?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List