How to access the contents of a vector from a pointer to the vector in C++?

后端 未结 8 894
不思量自难忘°
不思量自难忘° 2020-11-30 17:26

I have a pointer to a vector. Now, how can I read the contents of the vector through pointer?

8条回答
  •  隐瞒了意图╮
    2020-11-30 18:06

    There are a lot of solutions. For example you can use at() method.

    *I assumed that you a looking for equivalent to [] operator.

提交回复
热议问题