I have a class pagedetails , i am storing objects of pagedetails in a vector.
I want to access the elements of the vector using an iterator.
Code:std::vector<Pagedetails*> subcontentlist; subcontentlist.push_back(objptr->subcontent); vector<Pagedetails*>::iterator p = subcontentlist.begin();p should contain address of the Pagedetails object.
Here objptr->subcontent returns a Pagedetails object.
This does not happen. Can anyone help me?
rgds
swetha




Reply With Quote