byte array and header file

i want to set a mac address on a header file and initialize it.

i can not type

bla bla bla
public:
byte mac[]={0x00, 0xAA,0xBB, .....};

it does not let me it give me syntax error. I can only delete this declaration and give it once at the .cpp file.
it also asks to make it static but it does not work also.
Well propably there are many solutions but i want to initialize a byte array at the header file. is it possible.

i want to set a mac address on a header file and initialize it.

What you want to do and what you can do are not the same. Header files are for declaring variables. Source files are for valuing variables.

is it possible.

No.

i get syntax error for

byte const mac[]={....};

but i do not get error for

static const unsigned int localport=8888;

this is also initialization and it has no syntax error.

Also if i declare the array at .h file i can not use the above syntax to initialize it at the .cpp file i have to set each index one by one. I can tho just
declare and initialize by ones at .cpp tho.

i get syntax error for

Then, don't do that.

Also if i declare the array at .h file i can not use the above syntax to initialize it at the .cpp file i have to set each index one by one.

Welcome to reality.