我有一本字典 myResult:
Dictionary<String^,array< Byte >^>^ myResult = gcnew Dictionary<String^,array< Byte >^>();
我宣布
array <Byte^>^ a;
然后我将 a 添加到字典的键中
myResult->Add("OVERVIEW",a);
我收到一个错误
error C2664: 'System::Collections::Generic::Dictionary<TKey,TValue>::Add' :
cannot convert parameter 2 from 'cli::array<Type> ^' to 'cli::array<Type> ^'
1> with
1> [
1> TKey=System::String ^,
1> TValue=cli::array<unsigned char> ^
1> ]
1> and
1> [
1> Type=System::Byte ^
1> ]
1> and
1> [
1> Type=unsigned char
1> ]
感谢任何帮助,因为我对 c++/cli 还不是很熟悉;