阅读背景:

C - 如何将数组中的指针转换为索引?

来源:互联网 

In the many search functions of C (bsearch comes to mind) if a result is found, a pointer to the spot in the array is returned. How can I convert this pointer to the index in the array that was searched (using pointer arithmetic, i assume).In the many search functions of C (bsearch come




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: