A while ago, I read that there was a way to store many values in an array without using a loop, but I cannot remember the syntax. It was something like this.
1 2 3 4 5 6 7 8
#include <iostream>
usingnamespace std;
int main() {
int line [100] = {1 .. 100};
}
This would take every number from one to a hundred and store it as an individual element in the array. I have looked everywhere on the internet for when I first saw that, but I cannot find it. Is there any way to store all the numbers from 1 to a 100 in an array without using a loop? Thanks.