+ 4

What is vector in c++ Why it is used for?

14th Oct 2018, 7:56 AM
👑The_Local_Kid👑
👑The_Local_Kid👑 - avatar
4 Respuestas
+ 7
Vectors are dynamically allocated arrays. They are more comfortable, than arrays beacuse you can insert values in chosen place (not overwrite value), and remove whole vector from memory.
14th Oct 2018, 8:11 AM
Aleksander Szczepura
Aleksander Szczepura - avatar
+ 6
vectors are sequence containers representing arrays that can change in size for more information you can look this lesson https://www.sololearn.com/learn/261/?ref=app
14th Oct 2018, 8:26 AM
estifanos
estifanos - avatar
+ 3
Vector in C++ STL. Vectors are same as dynamic arrays with the ability to resize itself automatically when an element is inserted or deleted, with their storage being handled automatically by the container. Vector elements are placed in contiguous storage so that they can be accessed and traversed using iterators ectors in C++ C++ has a vector class within the std namespace. A vector is similar to an array, in a sense where a series of elements are stored with the same variable name. Unlike arrays, vectors are dynamically sized, which is a major advantage. https://www.geeksforgeeks.org/vector-in-cpp-stl/ http://www.cplusplus.com/reference/vector/vector/
14th Oct 2018, 9:47 AM
deepak sharma
deepak sharma - avatar
+ 3
Thank U So Much Brother And Thanks Again For your Kind Answer
14th Oct 2018, 9:50 AM
👑The_Local_Kid👑
👑The_Local_Kid👑 - avatar