I'm using the code from this answer to read a CSV file, and I want to assign the const CSVRow& row
value to a form control (e.g. a ListBox
). How can I accomplish this?
Here's the code I'd like to change:
void display(const CSVRow& row)
{
if(!row.size()) return;
CSVRowCI i = row.begin();
std::cout << *(i++);
for(; i != row.end(); ++i)
std::cout << ',' << *i;
}
But instead of std::cout << ',' << *i
, I want to do:
this->ListBox1->Items->Add(*i);
I tried using *i.ToString()
, but it gives me an error:
Cannot convert const std::basic string to System::String