如何在C中的数组元素上执行连接和拆分功能?如何在C中的Array上执行拆分和连接函数?
例如,假设我有两个数组:
int value[]= {0,1,2,3};
int id[] = {1,1,3,3};
// I want to join the elements of "value" array whoz value of "id" are same.
//In my case 0,1 elements from "value" array has the same "id" value that is 1,1
//and 2,3 from "value" has same "id" value 3,3. So it will join {01,23}
//And if i want to perform split function it will give me back{0,1,2,3}
我的确在perl脚本同样的事情,但我不知道我怎样才能用C此功能?
我在你们尝试才达到什么也不知道。我想你可能会以某种方式混淆字符串值和整数。 – c0m4 2013-04-05 13:28:34