"Cat" <ty*******@gmail.comwrote in message
news:a2**********************************@n20g2000 hsh.googlegroups.com...
Hi.
static readonly byte[] Exponent = new byte[] {0x1, 0x0, 0x1 };
This is a C# code. I would like to do the same thing in Managed C++
static array<Byte^>^ Exponent = gcnew array<Byte^>(3) {0x1, 0x0,
0x1 };
But this caused,
error C2440: 'initializing' : cannot convert from 'int' to
'System::Byte ^'
The error message says it all - you can't initialize Byte references with
integers.
It looks like you meant to allocate an array of Bytes, not an array of
Byte^s...
array<Byte>^ Exponent = gcnew array<Byte>(3){0x1, 0x0, 0x1};
Mark
--
Mark Salsbery
Microsoft MVP - Visual C++
How can I fix this? Please give me a hint.
Thank you.