阅读背景:

字符串类型数组的指针算法,C ++如何处理这个?

来源:互联网 

I am learning about pointers and one concept is troubling me. I understand that if you have a pointer (e.g.'pointer1') of type INT that points to an array then you can fill that array with INTS. If you want to address a member of the array you can use the pointer and you can do pointer1 ++; to step through the array. The program knows that it is an array of INTs so it knows to step through in INT size steps. But what if the array is of strings whcih can vary in length. How does it know what to do when you try to increment with ++ as each element is a different length?I am learning about pointers and one concept is




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

分享到: