trouble initializing a dynamic array of pointers to NULL
I have created a dynamic array of pointers to structures as shown below. I am trying to initialize them all to NULL but I keep getting errors. Can anyone tell me what I'm doing wrong? Thanks.
Code:
#include <iostream>
using namespace std; // So the program can see cout and endl
struct Window{
int handle;
bool test;
};
Window * Array = new Window[260];
int main()
{
for ( int x = 0; x < 260; x++ ) {
Array[x] = NULL;
cout<< x <<endl;
}
cin.get();
}
The error I get is: 16 no match for 'operator=' in '*((+(((unsigned int)x) * 8u)) + Array) = 0'