Could you be more specific as to what you don't understand, or do you just need someone to do your homework for you?
Anyway, so that this reply not be devoid of a "real" answer, read on...
A pointer is a variable which holds a memory address to data.
You declare a pointer by using an asterisk instead of an ampersand.
Example:
int *x;
When you wish to use the data that the pointer points to, you
dereference it.
You use the asterisk. This can be confusing, because you also use it to declare the pointer.
Example:
*x = 5;
How do you give a pointer a memory address?
You
reference a regular variable. By using the ampersand.
Example:
1 2 3 4
|
int a; // regular variable
int *x; // pointer
x = &a; // get a's memory address
*x = 5; // change a to 5
|
In your case, you need to declare
x and
y as pointers in your function's parameter list.
Then you need to dereference every time you change or use the data they're pointing to.
Finally when you call your
doSomething() function, you need to reference the variables you pass to it:
doSomething(&x, &y);
Good luck.