Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is the Difference between "vector" and "array"?

Answer Posted / mms zubeir

First, a vector is a template class but not the array is.
So obviously there are members to access the elements of
the vector like, range checking, iterators,
insertion/deletion, predicates, etc.

Since it is a template class, the same implementation can
be used for any type including pointers, objects/user
defined types.

Second, as said by others, vector automatically grow as we
invoke push_back(), we can reserve additional space for
elements, etc.

Is This Answer Correct ?    18 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the c++ programming language used for?

1093


how to access grid view row?

2283


List down the guideline that should be followed while using friend function.

1112


Can constructor be static in c++?

1167


What is a float in c++?

1028


How would you use the functions memcpy(), memset(), memmove()?

1142


What is the use of lambda in c++?

1079


What are the defining traits of an object-oriented language?

1260


What are c++ variables?

1100


How many ways can a variable be initialized into in C++?

1064


What is the difference between a baller and a reference in C++?

1169


Explain all the C++ concepts using examples.

1254


What is jump statement in C++?

1208


Can java be faster than c++?

1203


Can a Structure contain a Pointer to itself?

1204