I am trying to understand a part of a code in which
(*this).bond.assign(mck.bond.begin(), mck.bond.end())
I want to understand the role of begin() and end () command. I read at different places that it is an iterator index but i couldn't understand its meaning. I tried to understand it by writing a short code but it is not working. Can someone please help me to understand the above line of the code and the role of begin() and end() command.
int main()
{
vector<int> vec_name;
vec_name.push_back(10);
vec_name.push_back(20);
vec_name.push_back(30);
vec_name.push_back(40);
cout << vec_name.size() <<endl;
cout << vec_name.begin() <<endl;
}