Mega Code Archive

 
Categories / C++ Tutorial / Vector
 

Creates a vector of 10 ints with value 100

#include <vector> using namespace std; int main(int argc, char** argv) {   vector<int> intVector(10, 100); // creates a vector of 10 ints with value 100   return (0); }