Advertisement

What is this?

Started by March 02, 2002 06:54 AM
2 comments, last by sj 22 years, 6 months ago
I was looking at some tutorials and saw this: #include <vector> ... // Create the list of booleans for each triangle index vector pList1(numberOfTriangles); vector pList2(numberOfTriangles); vector pList3(numberOfTriangles); ... I haven''t seen this vector thing before, and I''m not quite sure what it does or how it works. Could someone explain this? Thanks.
A vector is part of the ''standard template library'' (STL). It functions similarly to a dynamic array.
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man
Advertisement
vector is a class in the Standard Template Library. You can read about the STL here.

vector works like an array, but you can add and delete elements from it at any time without having to worry about memory management. This makes them very useful and can save you lots of time.

There are a lot of other useful things in the STL. I suggest you read about them.
OK. Thanks again!

This topic is closed to new replies.

Advertisement