In C++11, you can do either of the following:
struct MyStruct
{
unsigned char myBytes[5] = {0x89, 0x50, 0x4E, 0x47, 0x0D};
};
// or...
struct MyStruct
{
unsigned char myBytes[5];
MyStruct() : myBytes{0x89, 0x50, 0x4E, 0x47, 0x0D}
{ }
};
Otherwise, you've got the best method already.