View Single Post
Old 03-30-2005, 10:20 AM   #3 (permalink)
glennandrewcoop
Registered User
 
Join Date: Mar 2005
Posts: 6
glennandrewcoop is on a distinguished road
Storing pointer in mulit-dimen array

Thanks for the above, it worked a treat, however, I've just developed my next problem:

I'm trying to allocate a customer object pointer to my int multi-dimensional array (as pointer addresses are int's), though its throwing up the following error:

error C2440: '=' : cannot convert from 'customer *' to 'int'


Here is the code for the function:

Code:
void setSeat(int,int, customer*);

void screen::setSeat(int xSeat, int ySeat, customer *cust)
{
  seatsXY[xSeat][ySeat] = cust;
}
glennandrewcoop is offline   Reply With Quote