C++交换函数的一个小问题

img


图中的代码那一行有什么问题吗?它为什么会报错,我运行的时候它就卡在那里了

#include<bits/stdc++.h>
using namespace std;
void swap(int *a,int *b){
    int temp = *a;
    *a = *b;
    *b = temp;
}
int main(){
    int a=1,b=2;
    swap(&a,&b);
    cout<<a<<" "<<b;
    return 0;
}

看看是不是那个分号搞错了,是不是用成中文的分号了