initialise a vector c++
vector<int> vect;
initialise a vector c++
vector<int> vect;
initialize vector c++
//me
typedef vector<int> vi;
vi a; a.push_back(10); //init empty vector then fill
vi b(10,0); //init vector with 10 0's
vi c {1,2,3}; //init vector like array
int l[] = {1,2,3}; vi d(l,l+ 3); //init vector with array
vi d1{10,20,30}; vi d2(d1.begin(), d2.end()); //init vector with another
vi e(10); fill(e.begin(), e.end(), 0); //init vector then fill with 0's
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us