Well, i'm new but here's my problem
pointer is a int, and i want to return the short value at the address of pointer.
data = pointer;
pointer += sizeof(data);
but this ^^ doesn't work, any suggestions?
Unless pointer is global and decalred somewhere else, it's not declared. You need to allocate space for it. Also, I'm not too sure what you're trying to do here. Either you need to rename your variables, or reorganize the equations. Right now it looks like "data" is a pointer and "pointer" is some data. And I don't think you need sizeof(data). pointer++ would work because C/C++ automatically scales the increments to the size of the variable.
One solution is dynamic allocation.