C++ does not consider a pointer to be an integer. If you want to store pointers in an array, it will have to be an array of pointers, not an array of integers.

Edit: Apart from anything else, an int may not be be big enough to store a pointer. If you made it an array of long ints, and then explicitly cast the memory address to a long int before storing it, it should work. But why not just store it as a pointer?