can we create instance of a vector?
Printable View
can we create instance of a vector?
Yes, obviously, if we're talking about std::vector.
Creating an instance of a vector as opposed to doing what else with it?
ya i was talikg about std:vector
i know this question may sound silly to you but i am a begineer!
The whole STL would be rather meaningless if we couldn't instantiate any of the containers/objects that are described within it.
Since std::vector is a template, you need to specify a type to create an instance of it. eg.
Code:std::vector<int> intVec;