我有這樣的結構,C++:C++陣列結構的訪問
struct Vertex_2 {
GLdouble position[3];
};
我想訪問其內部數組是這樣的:
Vertex_2.position[0] = //something;
Vertex_2.position[1] = //something;
....
...
..
當我編譯它,我得到這個:
error: expected unqualified-id before ‘.’ token
這是爲什麼?
謝謝!它現在有效 –