I am trying to initialise a shared pointer of std::valarray<double>, my code is
class foo {
public:
foo();
private:
std::shared_ptr<std::valarray<double>> meanValues;
};
In the constructor, I would like to fill up meanValues
foo::foo() {
this->meanValues = std::make_shared<std::valarray<double>>(2);
}
How do I fill up meanValues to have two values {1.2, 4.5}