Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

I think the first use of the term 'vector' is more conceptual - but is actually defining a string type that is implemented using a c-style string strategy. The second mention "Vector" is a more direct reference to the C++/Java Vector class and its imlementation.

Technically speaking, you an implement a c-style string using a STD:Vector by ignoring the length preamble and ensuring room is made for the null character. I got away with this in my intro to c++ class after showing the teacher that I already knew how to implement strings in C from a previous class.

C-style strings: http://www.learncpp.com/cpp-tutorial/66-c-style-strings/

C++ Vector class: http://en.cppreference.com/w/cpp/container/vector

Java Vector Class: http://docs.oracle.com/javase/7/docs/api/java/util/Vector.ht...



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: