Originally Posted by
laserlight
My point is that you need to be clear on what you are talking about. You talked about using subscript notation to point to an element, but that is wrong. Normally, you use subscript notation to access an element at some index. You might go on to take the address of that element and make a pointer point to it, but that is not directly related to the use of subscript notation.
You probably accidentally made a genuine fix while changing to the *(ptr+counter) notation. When ptr is a pointer and counter is an index (or vice versa, but that would not make as much sense), *(ptr+counter) is always equivalent to ptr[counter] (and also equivalent to counter[ptr], but that would be misleading).
Search the Friendly Web. For example, cppreference.com has some material on them.
EDIT:
str is a std::string, str1 is an array of 15 std::string objects.
You need to decide on what you want to do.