in C++ by (10.9k points)
0 like 0 dislike
19 views

How I can to initialize empty unnamed/nameless vector in C++?


cpp create empty unnamed vector

1 Answer

0 like 0 dislike
by (10.9k points) edited by

Create an empty unnamed/nameless vector you can like this:

std::vector<int>();
std::vector<char>();
std::vector<std::string>();

Create an empty named vector you can like this:

std::vector<int> vct;
std::vector<char> vec;
std::vector<std::string> vec;

Your answer

Try to answer the question as detailed as possible.
Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.