Horje
c++ vector declaration Code Example
c++ vector declaration
vector<int> vec;
//Creates an empty (size 0) vector

vector<int> vec(2);
//Creates a vector with 2 elements.

vector<int> vec(4, 3);
//Creates a vector with 4 elements.
//Each element is initialised to 3. 




Cpp

Related
c++ rand Code Example c++ rand Code Example
c++ switch integer Code Example c++ switch integer Code Example
1822. Sign of the Product of an Array leetcode Code Example 1822. Sign of the Product of an Array leetcode Code Example
find maximum contiguous Sub arrays Code Example find maximum contiguous Sub arrays Code Example
Marin and Photoshoot codeforces solution in c++ Code Example Marin and Photoshoot codeforces solution in c++ Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7