New to coding

I don't understand.

Why does this work
colourPos[i].insert(colourPos[i].begin(), 0);

Why can't i just put
colourPos[i].insert(0);

How do I learn what "things" (like insert) need "things" like .begin to work? And what do I mean by "things"?
You should learn to look it up things on a reference site.
http://www.cplusplus.com/reference/
http://cppreference.com/


Last edited on
shnabz wrote:
And what do I mean by "things"?
In context, you mean "member functions". There are also, however, global function templates such as std::begin and std::end.
Topic archived. No new replies allowed.