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 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 private stafford and plus student loans?

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


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;


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 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++.


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

There is no difference. Both statements are invalid.


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


What is front functions in c plus plus?

Front functions such as vector::front(), list::front() and queue::front() return the first object in a container class. Not to be confused with begin() functions such as vector::begin() which return an iterator object which is typically used in iterative functions (loops) to traverse the objects within a container.

Trending Questions
If you touch the earth wire do you get a shock if the supply entering a home is called multiple earthed neutral where the neutral is connected to the earth wire. Where does the neutral current go? What is a modern technological breakthrough that has had as great an impact as the invention of paper? What is a sentence using the word expediency? If you have finished working with a data file but intend to work on it again during your work session which button would you use to close the window temporarily? What is this the binary code of 01000010 01100001 01100011 01101011 00100000 01110101 01110000 00100000 01101101? Difference between program counter and instruction pointer? What type of Engineer designs electric engines? How many acres are needed for a wind turbine? What modifications of the approved process to suit the requirements of a projects is known as? When Ontario Hydro workers set up electrical cables during the summer they allow the cables to sag. Suggest a reason for this. In your answer refer to the particle theory? What are the applications for circular linked lists? What types of electrical waveforms do a function generator generate? How much electricity is consumed by a 15 hp motor being used for irrigation purpose? Is frac sand a carciagenic? What is the range of integer char float for a 16-bit computer? Why did linnaeus base his system of classification on physical similarities alone as opposed to incuding molecular and genetic similarities? What happens if your motor locks up? Why may you recommend the use of a macro instead of a subroutine inside a loop in a program? What is best programming language to learn first? What size is your wheelbarrow?