Home » Community » Newbie corner » U ++ Vector vs STL vector
Re: U ++ Vector vs STL vector [message #27336 is a reply to message #27334] |
Tue, 13 July 2010 00:13   |
Novo
Messages: 1430 Registered: December 2006
|
Ultimate Contributor |
|
|
“moveable” basically means that you can just "move" memory when you want to shift data in memory. You do not need to call a constructor and a destructor in a row. Such a situation happens very often when you want to resize a vector, which stores data in a continuous piece of memory. You just need to move old data into a newly allocated memory. If your data is "moveable" you can just call the memcpy() function instead of calling a copy constructor in a loop.
Hope this helps.
Regards,
Novo
|
|
|
Goto Forum:
Current Time: Wed Jun 25 19:05:50 CEST 2025
Total time taken to generate the page: 0.04046 seconds
|