Наши проекты:
Журнал · Discuz!ML · Wiki · DRKB · Помощь проекту |
||
ПРАВИЛА | FAQ | Помощь | Поиск | Участники | Календарь | Избранное | RSS |
[3.147.103.202] |
|
Сообщ.
#1
,
|
|
|
У меня есть метод куда нужно передать параметры.
#pragma once using namespace System; ref class id_cells { public: int X; public: int Y; String ^direction; String ^number; String ^word; String ^clue; public: id_cells(int x, int y, String ^d, String ^n, String ^w, String ^c) { this->X = x; this->Y = y; this->direction = d; this->number = n; this->word = w; this->clue = c; } }; Передачу строковых типов данных я разобралась, а вот числовые никак не получается. Выдаёт ошибку, когда я пытаюсь через Int::Parse передать число. скриншот while (getline(in, line)) { vector<string> l = split(line,'|'); id_cell = gcnew id_cells(Int32::Parse(gcnew System::String(l[0].c_str())),0, gcnew System::String(l[2].c_str()), gcnew System::String(l[3].c_str()), gcnew System::String(l[4].c_str()), gcnew System::String(l[5].c_str())); idc->Add(id_cell); } |