ok well i have structure
struct balls {
balls(UINT_PTR const &val) : BALL_ID(val){}
int Ex;
int Ey;
const UINT_PTR BALL_ID;
};
balls ball1(0x1);
and i have a switch statement
switch(wParam)
{
case ball1.BALL_ID:
if(ball1.Ex<300)
{
ball1.Ex++;
}
else
{
KillTimer(hWnd, ball1.BALL_ID);
}
InvalidateRect(hWnd, rect, false);
break;
case SCORECOUNTER_ID:
if(life==0)
{
if(scorecounter<1000)
{
scorecounter+=100;
_swprintf(str, _T("Score: %d"), scorecounter);
InvalidateRect(hWnd, rect, false);
}
else
{
_swprintf(level, _T("Level: %d"), 2);
InvalidateRect(hWnd, rect, false);
}
}
break;
}
i get an error thatball1.BALL_ID is not constant the second line should solved this but it didn't any idea?