【发布时间】:2023-10-11 05:54:01
【问题描述】:
看到这个问题Swapping in a char * array[ ] leading to issues
用户 Claudiu 给出了交换数组中字符串位置的解决方案
tmp = array[compare];
array[compare] = array[index];
array[index] = tmp;
但是,我想知道如何在一个函数中单独实现它。使用指针,我就是无法理解指针和字符数组之间的联系。
【问题讨论】: