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 pdb file?

1003


What is the difference between prefix and postfix versions of operator++()?

1083


How we can differentiate between a pre and post increment operators during overloading?

1107


Can I learn c++ in a week?

1074


If dog is a friend of boy and boy is a friend of house, is dog a friend of house?

1011


Is java the same as c++?

991


Why the usage of pointers in C++ is not recommended ?

1454


Is oops and c++ same?

1050


I was a c++ code and was asked to find out the bug in that. The bug was that he declared an object locally in a function and tried to return the pointer to that object. Since the object is local to the function, it no more exists after returning from the function. The pointer, therefore, is invalid outside.

1134


What is pure virtual function?

1066


Is sorted c++?

1107


write a corrected statement so that the instruction will work properly. if (4 < x < 11) y = 2 * x;

2008


What is a singleton class c++?

1037


Is overriding possible in c++?

1014


What is the identity function in c++? How is it useful?

1054