|
-
January 27th, 2012, 12:32 PM
#15
Re: problem with push_back
 Originally Posted by Fellow
I'd like to create with vector many persons:
person1
person2
...
"people" could/should be the iterator, shouldn't it?
In
Code:
for(int i=0; i<people.size(); i++)
{
cout<<(*people[i]).get_name();
}
I thought "people" as an iterator is already working!?
people isn't an iterator, it's a vector. That code doesn't directly use iterators.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|