C++ trying to swap values in a vector

后端 未结 4 1603
礼貌的吻别
礼貌的吻别 2020-12-01 04:18

This is my swap function:

template 
void swap (t& x, t& y)
{
    t temp = x;
    x = y;
    y = temp;
    return;
}
4条回答
提交回复
热议问题