【发布时间】:2018-11-22 15:49:43
【问题描述】:
我需要做什么来改变change_sequence_2() 能够从tausche_2() 获取信息?
void tausche_2 (char *c1, char *c2)
{
char temp;
temp = *c1;
*c1 = *c2;
*c2 = temp;
}
void change_sequence_2(char *F)
{
int i, j;
i = 0;
j = strlen(F) - 1;
while (i < j) {
tausche_2 (F, i, j);
i = i + 1;
j = j - 1;
}
}
【问题讨论】:
-
tausche_2 只有两个参数,但你用 3 调用它,'i'和'j'应该是'&i'和'&j'。
-
欢迎来到stackoverflow,请使用tour,然后阅读:How to Ask和这个:minimal reproducible example