answersLogoWhite

0

Although they share many of the same features, there are many differences. For instance, a list does not have an index operator [] while a vector does not have a merge method. If in doubt, simply look at the variable's declaration -- it will explicitly state whether the variable is a list or a vector (or indeed some other STL container), along with the type of data that it contains. Ultimately a vector is just an array, ideally suited to random access, whereas a list is ideally suited to sequential access.

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

What is the angle between vector a and vector b when mode of vector a plus vector b is equal to mode of vector a minus vector b?

90 degrees


What is an ordered list of data structure using c plus plus?

An ordered list of data in any programming language is simply a sorted array or list. In C++ this can either mean a sorted array, vector, list or forward list.


What is the difference between private stafford and plus student loans?

What is the difference between private stafford and plus student loans?


What difference between two nodes in c plus plus of single link list?

Their address. They may also have different values, and their sequence may matter, depending on the design of the algorithm.


What is the difference between pointers in c and c plus plus?

Nothing.


What is the difference between be plus ing and get plus ing?

There are no such terms in C++.


When magnitude of vector a plus b is equal to the magnitude of vector a minus b then what is the angle between two vectors a and b?

2pi/3 radian or equivalent 120 degree


What is the difference between statements in c plus plus charconstp and char constp?

There is no difference. Both statements are invalid.


C plus plus array-based lists?

If you mean an array where each element is a list, then the STL is your friend. To create an array of lists of any type T, use the following declaration: std::vector<std::list<T>> my_array_of_lists;


Vector A plus vector B equals 2i and vectorA-vectorB equals 4j then angle between vectorA and vectorB is?

I've got to assume that your ' i ' and your ' j ' are the same thing.Vector A = j3Vector B = -j1The angle between them is (pi).


What is the difference between plus 8 and -12?

-4


Difference between void and devoid in c plus plus?

There is no such thing as devoid in C++.