-
March 24th, 2010, 08:20 AM
#1
Efficiency
I know I can iterate through a vector using:
for(vector::size_type i = 0; i < vec.size(); i++){
cout << vec[i];
}
(vec is the name of the vector)
I also know that I can use an iterator to go through the vector. My question is: which one is more efficient?
Tags for this Thread
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
|