Why am I being told that an array is a pointer? What is the relationship between arrays and pointers in C++?

后端 未结 6 1055
情书的邮戳
情书的邮戳 2020-12-02 02:39

My background is C++ and I\'m currently about to start developing in C# so am doing some research. However, in the process I came across something that raised a question abo

6条回答
  •  无人及你
    2020-12-02 02:52

    The meaning in this guide was simply that in C# an array is an object (perhaps like in STL that we can use in C++), while in C++ an array is basically a sequence of variables located & allocated one after the other, and that's why we can refer to them using a pointer (pointer++ will give us the next one etc.).

提交回复
热议问题