FYB, you forgot a '&':

Code:
void something(int *X, int Z)
{
*X = *X + Z;
}


int x = 1;
int y = 2;
something(&x,y);