Trouble understanding.

I'm having trouble understanding this:

" The class should use a structure that stores the following information:

Drink name
Drink price
Number of drinks in machine

The class should have an array of five of these structures."

I don't understand the part in bold.

Is it asking me to create an array for each of the components of the structure? I don't understand why the use of structure in plural, if it clearly says to create ONE structure.

Thank you for your help.
The structure will contain one variable for each of those items listed. The class will contains an array of the structure.

So the class has 5 instances of the structure, but each instance of the struct only has 1 of each var:

1
2
3
4
5
6
7
8
struct mystruct  // struct
{
  int foo;
  int bar;
};

// an array of that struct
mystruct info[5];
Ok, understood.

Thank you very much.
Topic archived. No new replies allowed.