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
,索引为 0
、1
和 2。
films [0]
films [1]
films [2]
关于C++数据结构声明,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21225750/