cout<<"*n1 is: "<<*x<<", *n2 is: "<<*y<<endl;
When you claim to print *n1, you actually print *x and when you claim to print *n2, you actually print *y. What do x and y have to do with anything here?
a struct or class is a user defined type, as is a typedef/using etc.
yes, you can use ints, but swapping ints is the same as pointers, no real gain there; the only point is if you had pointers already and were just in the middle of something.
so what would i change?
Add the prototype of your swap(...) function before main().
change the name of it to myfreakingswap so it does not collide with anything? Try hard not to use names that are part of the namespaces or common items at least. Also you can look at using less than std, and pull in only what you need eg using std::cout
Your swap is an integer swap that happens to take pointers to the ints. Mine is a pointer swap, that swaps the pointers instead of the items. Its an important difference.