Search
 
SCRIPT & CODE EXAMPLE
 

CPP

vector int initialize with increasing numbers

#include <iostream> 
#include <vector> 
#include <numeric>
using namespace std;
int main()
{
    vector<int> v(10); 
    iota (begin(v), end(v), 0); 
    for (auto i : v) {
        cout << i << ' ';
    } cout << endl;
    return 0;
}
Comment

PREVIOUS NEXT
Code Example
Cpp :: person parametr cpp 
Cpp :: how to type a vertical stack program c++ 
Cpp :: binary to int c++ bitset 
Cpp :: c++ write number to registry 
Cpp :: how to pronounce beaucoup 
Cpp :: c++ take n number from the user and store them in array and get the max, min number of them and also find the average/summation of these numbers 
Cpp :: C++ Detect when user presses arrow key 
Cpp :: c++ program to convert fahrenheit to kelvin 
Cpp :: how to seek to the start of afile in c++ 
Cpp :: find min and max in array c++ 
Cpp :: string in int in cpp 
Cpp :: KL/wweiok#L['.[- 
Cpp :: overwrite windows mbr c++ 
Cpp :: is variable sized array are not allowed in c++? 
Cpp :: dinamic 
Cpp :: Increase IQ codechef solution in c++ 
Cpp :: how to run the code 
Cpp :: convert c++ to c language 
Cpp :: heroatx77 
Cpp :: C++ Single Line Comments 
Cpp :: how to find the sum of elements in a stack in cpp 
Cpp :: SDL_BlitSurface 
Cpp :: how to get steam id c++ 
Cpp :: ordine crescente "senza" vettori in c++ 
Cpp :: erase in c++ 
Cpp :: convert GLFWwindow* to IntPtr 
Cpp :: Studying Alphabet codechef solution in c++ 
Cpp :: inbuilt function for bin to dec in c++ 
Cpp :: c++ loop 
Cpp :: find the second aperrence of a char in string c++ 
ADD CONTENT
Topic
Content
Source link
Name
8+5 =