i have to write code for swapp() using int* as an argument.code is as follows-->

#include<iostream>

void swap_(int* a, int*b){

int c=(int) a;

int m=(int) b;

int n=c;

cout<<" the swapped value of a and b are"<<m<<"\t"<<n;

}

void main()

{
cout<<" \nenter a and b";
int m,n;
cin>>m>>n;
int *l=&m;
int *o=&n;
swap_( l, o );
}


is it right or am i doing wrong??
help me out.
actually what is happening is that 'a' is storing the address of 'm' and 'b' is storing the adress value of 'n'.
like this

for example
-----------
the value in a= | 0xffcd | (this is address of m)
-----------
-----------
the value in b= | 0xffce | (this is address of n)
-----------

now when i swap it.. value in a and b are swapped but i never get the value in integer.. i mean like if
m=4,n=5. after swapping it should be m=5;n=4;and let me remind you that i am restricted to use only int* as the argument.
would be glad to see some help'S message around.