By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,346 Members | 2,318 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,346 IT Pros & Developers. It's quick & easy.

how to copy from a vector into an array?

P: n/a
how to do it by using the copy algorithm of stl, please?

Apr 18 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
co*******@gmail.com wrote:
how to do it by using the copy algorithm of stl, please?


Pointers into an array can be used as random access iterators.
Best

Kai-Uwe Bux
Apr 18 '06 #2

P: n/a
co*******@gmail.com wrote:
how to do it by using the copy algorithm of stl, please?


If v is your vector, and a is an array of sufficient length:

std::copy(v.begin(), v.end(), a) ;

Alan
Apr 18 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.