我有一个类,我想为图像中的每个像素存储三个数据点。我认为 std::tuple 将是这样做的好方法:
class CameraManager {
private:
static const int width_ = 700;
static const int height_ = 574;
//this causes a segfault...
std::tuple<double,double,bool> mapping_[width_][height_];
public:
CameraManager();
}
段错误直接发生在 main(int argc, char ** argv) 因为我在这个函数中声明了一个相机管理器对象。
这里发生了什么?