您有一个包含 Excel 单元格区域的多维托管数组。它必须传递给类方法,以便该方法可以访问将数据写入单元格。
这是数组:
array <Range^,3>^ oRange = gcnew array<Range^, 3>(31, 6, 1);
这是其初始化的片段:
oRange[0, 0, 0] = oSheet->Range["D3", "D3"]; //Формат
oRange[0, 1, 0] = oSheet->Range["E3", "F3"]; //Зона
oRange[0, 2, 0] = oSheet->Range["G3", "H3"]; //Поз.
oRange[0, 3, 0] = oSheet->Range["I3", "M3"]; //Обозначение
oRange[0, 4, 0] = oSheet->Range["N3", "S3"]; //Наименование
oRange[0, 5, 0] = oSheet->Range["T3", "T3"]; //Кол-во
oRange[0, 6, 0] = oSheet->Range["U3", "V3"]; //Примеч.
这是类方法原型:
void Print(int& int_Index, int& int_Position, array <Range^, 3 > ^ oRange);
当我尝试调用类方法时,出现错误:
Strip1->Print(0, 4, oRange);