creare array con c++

C++
#include <iostream>
int main()
{
int myArray[] {2, 4, 6, 8, 10};
for (int i=0; i<5; i++)
{
std::cout << "index: " << i << " - value: " << myArray[i] << "\n";
}
return 0;
}
Source

Also in C++: