/******************************************************************************
Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
Code, Compile, Run and Debug online from anywhere in world.
GS
26 Jan. 2022
*******************************************************************************/
#include <iostream>
#include <vector>
std::vector<int> v =
{
1,
2,
3,
[7] = 12, // Why does this "work" here? What is happening?
[10] = 15,
4,
};
int main()
{
for (int i : v)
{
std::cout << i << "\n";
}
printf("\n");
return 0;
}