creating objects

I have a main class and a seperate class called Modules. I want to create the arrays listed in my code consisting of Modules objects. I am getting the following error:

Form1.h(120): error C2065: 'Modules' : undeclared identifier

How can i fix this? I have tried to do this:

array<Modules^>^ weapons = new Modules[41];

This doesn't work either. Suggestions are greatly appreciated. I have obviously abbreviated my code to only include the parts I think are involved.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
public ref class Form1 : public System::Windows::Forms::Form
{
public:
Form1(void)
{
  Modules[] weapons = new Modules[41];
  Modules[] thrusters = new Modules[18];
  Modules[] dampeners = new Modules[20];
  Modules[] hulls = new Modules[30];
  Modules[] reactors = new Modules[40];
  Modules[] scanners = new Modules[32];
  Modules[] cloaks = new Modules[18];
  Modules[] jammers = new Modules[20];
  Modules[] shields = new Modules[33];
  relaymod[] relays = new relaymod[10];
		}
Topic archived. No new replies allowed.