It still works with std::array
/* Online C++ Compiler and Editor */
#include <iostream>
#include <cstdint>
#include <algorithm>
#include <array>
#include <iterator>
#include <string>
using namespace std;
#define SIZE 5
class Obj
{
public:
//private:
std::array <uint8_t, SIZE> member = {0, 1, 2, 3, 4 };
} ;
Obj myObj ;
int main()
{
for ( int i = 0; i < SIZE ; i++ ) {
std::cout << (uint16_t)myObj.member[i] << endl;
}
return 0;
}