Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/149.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++;MinGW未找到std::vector.data 我已经能够使用以下C++代码使用OpenGL的GLVTEX指针函数: glVertexPointer(3, GL_DOUBLE, 0, myMeasuredPoints.data()); MyStalePosits是一个具有双重类型元素的C++向量。当用VisualC++编写此代码时,根本没有问题。但是,使用MinGW进行编译时,出现以下错误: error: 'class std::vector<double, std::allocator<double>' has no member named 'data' error:'class std::vector_C++_Mingw - Fatal编程技术网

C++;MinGW未找到std::vector.data 我已经能够使用以下C++代码使用OpenGL的GLVTEX指针函数: glVertexPointer(3, GL_DOUBLE, 0, myMeasuredPoints.data()); MyStalePosits是一个具有双重类型元素的C++向量。当用VisualC++编写此代码时,根本没有问题。但是,使用MinGW进行编译时,出现以下错误: error: 'class std::vector<double, std::allocator<double>' has no member named 'data' error:'class std::vector

C++;MinGW未找到std::vector.data 我已经能够使用以下C++代码使用OpenGL的GLVTEX指针函数: glVertexPointer(3, GL_DOUBLE, 0, myMeasuredPoints.data()); MyStalePosits是一个具有双重类型元素的C++向量。当用VisualC++编写此代码时,根本没有问题。但是,使用MinGW进行编译时,出现以下错误: error: 'class std::vector<double, std::allocator<double>' has no member named 'data' error:'class std::vector,c++,mingw,C++,Mingw,在C++11中添加了data函数。确保您使用-std=c++0x或-std=c++11进行编译,并且具有包含该函数的MinGW版本 如果不可能,可以使用常用的C++03变体: &myMeasuredPoints[0] 在C++11中添加了data函数。确保您使用-std=c++0x或-std=c++11进行编译,并且具有包含该函数的MinGW版本 如果不可能,可以使用常用的C++03变体: &myMeasuredPoints[0] 如果编译器不支持C++11,则可以使用 &a

在C++11中添加了
data
函数。确保您使用
-std=c++0x
-std=c++11
进行编译,并且具有包含该函数的MinGW版本

如果不可能,可以使用常用的C++03变体:

&myMeasuredPoints[0]

在C++11中添加了
data
函数。确保您使用
-std=c++0x
-std=c++11
进行编译,并且具有包含该函数的MinGW版本

如果不可能,可以使用常用的C++03变体:

&myMeasuredPoints[0]

如果编译器不支持C++11,则可以使用

&myMeasuredPoints[0]

如果编译器不支持C++11,则可以使用

&myMeasuredPoints[0]

如果您确实需要更新版本的MinGW,并且愿意/能够更新,我觉得这很简单也很有用:如果您确实需要更新版本的MinGW,并且愿意/能够更新,我觉得这很简单也很有用: