Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Range List for C++
// Range List for C++ #include <iostream> #include <vector> #include <cmath> #include <numeric> using namespace std; int main(){ int a=1,b=20,c=3; vector<int> rng(ceil((float)(b-a)/c)); iota(rng.begin(),rng.end(),0); for(auto &i:rng) i=a+i*c; for(auto i:rng){ cout<<i<<endl; } return 0; }
run
|
edit
|
history
|
help
0
Result of not joining thread in main()
C++ Register
std::set custom ordering with composition
Member inheritance
sfinae
void pointer
U2
sort
general
back_inserter example