Why is a C++ Vector called a Vector?

后端 未结 16 2379
情话喂你
情话喂你 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:07

    To complement the excellent response from @MarkRuzon:

    Alex said that to give a name to what is now called std::vector he observed the name that Scheme and Common Lisp ​​had given to similar data structures.

    Later he admits he was wrong because C++ vector has nothing to do with the vectors in mathematics.

    He also says that he introduced an error of a community of 50 people to a community of 5 million people, so the error is likely to remain forever.

提交回复
热议问题