the following thing works normal swapping: but
if change function call to
swap(a++,b++);
it dos'nt work why?
thanx!!Code:#include<stdio.h> #include<conio.h> void swap(int&, int&); int main() { int a = 10,b=20; swap(++a,++b); printf("\n%d\t%d\t",a, b); getch(); return 0; } void swap(int& x, int& y) { x+=2; y+=3; }