Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ initialize a vector

#include <bits/stdc++.h> 
#include <vector> 
using namespace std; 
  
int main() 
{ 
// This vector initializes with the values: 10, 20, and 30
  vector<int> vect{ 10, 20, 30 }; 

    return 0; 
} 
Source by www.techiedelight.com #
 
PREVIOUS NEXT
Tagged: #initialize #vector
ADD COMMENT
Topic
Name
2+6 =