Open pazeshun opened 5 years ago
std::vector<Vl53l0xMraa> lox; lox.push_back(Vl53l0xMraa()); lox[0].begin(&i2c);
will cause segmentation fault.
Temporary solution: using boost::scoped_array(C++03) or std::unique_ptr(C++11)
boost::scoped_array
std::unique_ptr
#include <boost/scoped_array.hpp> boost::scoped_array<Vl53l0xMraa> lox(new Vl53l0xMraa[1]); lox[0].begin(&i2c);
will cause segmentation fault.