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

From this tutorial: http://www.cplusplus.com/doc/tutorial/structures/

If I understand correctly films is the declaration of an array of four data structures of the type movies_t. Is that correct or is there something else to this?

Thanks...

2
  • 1
    Seems correct, only there are three elements, not four. Commented Jan 20, 2014 at 3:27
  • It's 3 data structures. Commented Jan 20, 2014 at 3:27

1 Answer 1

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

Nope. It's having size 3 with index 0, 1 and 2.

films [0]
films [1]
films [2]
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.