簡體   English   中英

C ++數據結構聲明

[英]C++ data structure declaration

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]

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM