Pointers in C

I have a pointer that points to an array of MenuItem object pointers that points to MenuItem Objects

The following link should help explain what I am doing with class diagrams.
https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0B11J5Ff0XQxgMjAzNzdjZTQtYTU1ZS00NzVlLWJjOWQtNGUxZjRlZDY2NzBi&hl=en&authkey=CJ7DmdQJ

In the header I have:

MenuItem **itemsp;


I am trying to initialize the array pointer in the class constructor that I am actually working with.


itemsp = *MenuItem [count];

I get the following error.

hw4.cpp: In constructor ‘Order::Order(int)’:
hw4.cpp:45: error: expected primary-expression before ‘[’ token


How do I initialize this?
I cant open the link.
Is Class MenuItem have an operator '[' member?
Assuming the menuitem array is being created dynamically using new

then you need something like:
itemsp = new MenuItem* [count];
Topic archived. No new replies allowed.