Hi, i am trying to write a small app using vc++ express and the mysql api. i can connec to a db, retrieve results but i want to add these to an listbox. using listBox1->Items->Add(row
);
but this gives the error:
'System::Windows::Forms::ListBox::ObjectCollection::Add' : cannot convert parameter 1 from 'char *' to 'System::Object ^'
so i need a way to type cast this i presume or a way around it at least. n e suggestions would be great. thanks

Type Casting??
dkorsunsky
Thank you :)
worked like a charm
alex2308
Convert the char* to a System::String. Use the String constructor that takes a char* to do this.
Items->Add(gcnew String(pChar));