阅读背景:

How do you copy the contents of an array to a std::vector in C++ without looping? (From stack over flow)

来源:互联网 

I have an array of values that is passed to my function from a different part of the program that I need to store for later processing. Since I don't know how many times my function will be called before it is time to process the data, I need a dynamic storage structure, so I chose a std::vector. I don't want to have to do the standard loop to push_back all the values individually, it would be nice if I could just copy it all using something similar to memcpy.I have an array of values that is passed to my




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: