Vectors, are they the same as Arrays?

greenspun.com : LUSENET : Steve Heller's books : One Thread

Hi Steve, I was wondering in your first book (Who's afraid of C++?) you get into vectors. In my class here in Denmark we call the same thing an array. Are they the same? And if not why not; it seems like a 'walk like a duck...etc. to me... Many thanks...( pe forhend tak ) Kirk Ps I already ordered the sequel, and that is something for a poor student....

-- Kirk C. (kisckcc@hotmail.com), November 21, 1999

Answers

Vectors vs. arrays

No, vectors and arrays are not the same. They differ in several ways, but the most important is that vectors (as I implement them, anyway) check whether you're trying to access an element that doesn't exist. This prevents you from making serious errors in programming.

-- Steve Heller (stheller@koyote.com), November 25, 1999.

Thanks

By the way, I forgot to thank you for your compliments on my writing. Thanks!

-- Steve Heller (stheller@koyote.com), November 25, 1999.

Moderation questions? read the FAQ