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 a string example?

1007


What is c++ hash?

1051


What are the rules for naming an identifier?

1010


How would you implement a substr() function that extracts a sub string from a given string?

988


How do you print a string on the printer?

988


What does #define mean in c++?

1184


How do you declare A pointer to function which receives an int pointer and returns a float pointer

1115


Can you overload the operator+ for short integers?

989


How do we balance an AVL Tree in C++?

1087


Explain how a pointer to function can be declared in C++?

977


Can java be faster than c++?

1103


Do class method definitions?

979


What are the c++ access specifiers?

1340


What is using namespace std in c++?

1082


Is java made in c++?

1000