object and array?

May 18, 2013 at 1:26pm
Create an application program that declares an array of
100 components of type Item.

Is create 100 item object by array or create an object and inside the object has 100 array?
May 18, 2013 at 1:29pm
All what you need is the line

Item items[100];

:)
May 18, 2013 at 1:30pm
declares an array of 100 components of type Item.
Item arr[100];
May 18, 2013 at 1:31pm
Thx. ^^
May 18, 2013 at 1:49pm
I would give bonus marks for:

1
2
3
const size_t itemCount = 100;

Item items[itemCount];


Andy
Last edited on May 18, 2013 at 1:49pm
Topic archived. No new replies allowed.