Ich möchte eine Reihe von Händels wie dem folgenden Code deklarieren:Wie man array of handel deklariert?
using namespace System::Drawing;
ref class B
{
Bitmap^ b[];
B()
{
b = new Bitmap^[10];
}
};
Aber es Fehler warf, wenn
error C2728: 'System::Drawing::Bitmap ^' : a native array cannot contain this managed type
error C4368: cannot define 'b' as a member of managed 'B': mixed types are not supported
error C2728: 'System::Drawing::Bitmap ^' : a native array cannot contain this managed type
error C2440: '=' : cannot convert from 'System::Drawing::Bitmap ^*' to 'System::Drawing::Bitmap ^[]'
Jemand Kompilieren können die richtig Art und Weise mir sagen, eine Reihe von Händels zu erklären?
Vielen Dank!
T & TGroup
Ich hätte lieber eine Reihe von Mozart als von Händel. Meinst du Griff? – crashmstr
String handelsWorks [] = {"Nero", "Almira", "Messiah"} :) Nur ein Witz. – Almo
Auch ich schlage vor, nur Ihren ersten Fehler googlen, um das Problem zu sehen. Sie werden hier zur Lösung geführt: http://stackoverflow.com/questions/995434/arrays-of-strings-in-managed-c –