In managed C++/CLI, I could do this either as (1):
array<System::Byte>^ css_keycode = {0x51, 0x67, 0x67, 0xc5, 0xe0, 0x00};
or (2):
array<System::Byte>^ css_keycode;
css_keycode = gcnew array<System::Byte>(6) {0x51, 0x67, 0x67, 0xc5, 0xe0, 0x00};
But I apparently can't do (3):
array<System::Byte>^ css_keycode;
css_keycode = {0x51, 0x67, 0x67, 0xc5, 0xe0, 0x00};
even though I can do (4):
array<System::Byte>^ css_keycode = {0x51, 0x67, 0x67, 0xc5, 0xe0, 0x00};
array<System::Byte>^ css_keycode_shadow;
css_keycode_shadow = css_keycode;
Is there a better way that I'm missing? I'd like to have a simple/clean way to write somethiing like this:
public ref class decoder {
array<System::Byte>^ css_keycode;
...
decoder(void) {
css_keycode = {0x51, 0x67, 0x67, 0xc5, 0xe0, 0x00};
}
}
Thanks!