I am using something like this:
std::vector<std::array<double, 3>> myarray;
but when I want to add new elements into the array, I try to use
myarray.push_back({0, 0 ,0});
It doesn't compile with VS2012.
So how can I use std::array as an element of std::vector?
Thank you.
You're out of luck I'm afraid: VS2012 does not support brace initialisation.
Note that your code is valid C++11.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With