用指针写的交换程序 哪不对了

#include"stdio.h" void main() { int a=10,b=20; int *x=&a,*y=&b; printf("a=%d,b=%d\n",a,b); swap(x,y); printf("after swap\ta=%d,b=%d\n",a,b); } void swap(int *x,int*y) { int t; t=*x; *x=*y; *y=t; }老师在课上用TC实验了下 能够正确运行 自己用VC6.0 运行时总提示错误 高手给看下 是不是写错了还是哪设置的不对