I need to split string to an array. And I get object reference not set to an instance of an object when I try to add new object to the array:
array<d3^> ^pr_d3; //d3 - class
parts = sr->ReadLine()->Split(
(array<String^>^)nullptr,
StringSplitOptions::RemoveEmptyEntries); //array<String ^> ^parts;
pr_d3[0] = gcnew d3(
parts[0], parts[1],
parts[2],
Convert::ToInt16(parts[3]), Convert::ToInt16(parts[4])); //error
C++was wrong as this is actuallyC++/CLI(en.wikipedia.org/wiki/C%2B%2B/CLI)