How to wap pointers adresses without swapping the values they are pointing at

前端 未结 0 886
名媛妹妹
名媛妹妹 2021-01-29 07:27

I\'ve written the following function:

void swap_pointers(int * x, int * y){
    int temp = x;
    x = y;
    y = temp;
}

This is swapping the add

相关标签:
回答
  • 消灭零回复
提交回复
热议问题