struct movies_t {
  string title;
  int year;
} films [3];


从本教程中:
http://www.cplusplus.com/doc/tutorial/structures/

如果我正确理解的话,films是声明movies_t类型的四个数据结构的数组。那是正确的还是其他吗?

谢谢...

最佳答案

If I understand correctly films is the declaration of an array of four data structures of the type movies_t.


不。它的大小为3,索引为012.

films [0]
films [1]
films [2]

09-04 02:18