C++将向量分配给数组

The*_*ing 0 c++ arrays syntax stdvector

将向量分配给数组时,为什么我的大小会发生变化?

cout << endl << vertices.size() << endl;  //outputs correct number-> 89473
GLfloat* Vertices = &vertices[0];
GLfloat* Colors = &colors[0];
cout << endl << sizeof(Vertices) << endl; //outputs incorrect number-> 4
Run Code Online (Sandbox Code Playgroud)

我知道我可以循环并单独分配(而不是一行分配),但我只是想知道为什么会这样.

Bra*_*Box 6

vertices.size()给出顶点数组中元素的数量(89473),同时sizeof(Vertices)计算指针的大小,恰好为4.