I am new to boost and I came across the boost pointer.
float *value = new float[9];
value[0] = 5; ...
The above is my initial c++ code.
I converted the above to boost shared pointer
boost::shared_ptr<float> value (new float);
But when I try to add to value it gives me error that i cant use operator[].
I guess this is too basic, but can I get some info on how to add values to memory pointed by the boost pointer.
std::shared_ptrso you should use that rather than boosts offering. Further, unless you have a significant reason otherwise, you shouldstd::vectororstd::arrayfor 'array like' things.std::async,std::future,std::thread,std::vector<bool>,u8literals, and so many more.