Question: In `C` I have

```
unsigned long arr[256]={0x00000000L,0x01020304L,0x21223212L,...}

```

in C++ in `.h`-file i have

```
private:
    unsigned long arr[256];

```

how-to populate it (fastest way) in `.cpp` file with 256 constant values?

```
arr[256]={...}
// and
arr={...}

```

not work :-\

Answer: 
Use initializer list in constructor:

```
// .h
class C
{
public:
    C();
private:
    unsigned long arr[256];
};

// .cpp
C::C() : arr{0x00000000L, 0x01020304L, 0x21223212L, ...} {}

```

Note that `std::array` may be an alternative which has more intuitive syntax and is assignable.
This is standard C++ code:

```
class C
{
private:
    unsigned long arr[256] = {0x00000000L,0x01020304L,0x21223212L};
};

auto main() -> int
{
    C c; (void) c;
}

```

Unfortunately it doesn't compile with Visual C++ 19.00.22310.1. Workaround:

```
#include <array>

class C
{
private:
    std::array<unsigned long, 256> arr;

public:
    C(): arr( {0x00000000L,0x01020304L,0x21223212L} ) {}
};

auto main() -> int
{
    C c; (void) c;
}

```