Friday, July 31, 2009

Please explain the function of vector command in c++?

What is the function of the command "vector" is c++





for example this :


vector %26lt;NodeId%26gt; memberList;

Please explain the function of vector command in c++?
Vector under C++ is a template provided with the Standard Template Library (STL), which holds similar type of objects.


These data stored can be refered at a latter point of time, in a random access manner.


Since Vector is a template - it can store any type of data - be it a premitive type (int, long, float, etc) or structure and class.





Vector STL Documentation:-


http://www.sgi.com/tech/stl/Vector.html





Examples:-


http://www.codeproject.com/vcpp/stl/std_...
Reply:Vectors contain contiguous elements stored as an array.





check thislink on how to use them


http://www.codersource.net/c++_vector_st...





kedar


No comments:

Post a Comment