struct movies_t {
string title;
int year;
} films [3];
从本教程: http://www.cplusplus.com/doc/tutorial/structures/
如果我理解正确,则电影是由四个类型为movies_t的数据结构组成的声明。这是正确的还是还有别的呢?
...谢谢
答案 0 :(得分:1)
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]