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?
Similarly, when you create a vector of strings and use the reserve keyword how does it know how much to reserve if strings can be different lengths? This is probably really obvious but I can't work it out and it doesn't fit in with my current (probably wrong) thinking on pointers. Thanks