我有
const char* one = "q";
const char* two = "p";
如果我添加代码
const char* temp = two;
two = one;
one = temp;
我可以切换“一”和“二”的内容,但是用
void order(const char* first, const char* second)
{
const char* temp = second;
second = first;
first = temp;
}
order(one, two);
我无法切换它们。我猜这是因为我将错误的参数传递给我的函数?