Why is a C++ Vector called a Vector?

后端 未结 16 2405
情话喂你
情话喂你 2020-12-04 07:42

The question\'s pretty self-explanatory really. I know vaguely about vectors in maths, but I don\'t really see the link to C++ vectors.

16条回答
  •  忘掉有多难
    2020-12-04 08:10

    No idea about the real reason, but C++ calling it a vector instead of an array, reduces confusion between the C and C++ structures, although they fulfill the same roles.

提交回复
热议问题