std::copy is going to use vector as an array. You have to resize it, so it can store all needed values.
You can also use std::back_inserter. It will resize vector when necessary.
4
solved What is wrong using c++ copy function?
std::copy is going to use vector as an array. You have to resize it, so it can store all needed values.
You can also use std::back_inserter. It will resize vector when necessary.
4
solved What is wrong using c++ copy function?