H
Howard Kaikow
I'm trying to use a Form in C++ for the first time.
Alas, my only C++ .NET book is for 2002, so it does not cover Forms.
In the snippet below, where lstOutput is a Listbox control, I get the error:
i:\C++\C++Code\UseForm\Form1.h(121): error C2664:
'System::Windows::Forms::ListBox::ObjectCollection::Add' : cannot convert
parameter 1 from 'char *' to 'System::Object __gc *'
What do I have to do to correct the problem?
char *buffer;
buffer = "Bagels";
lstOutput->Items->Add(buffer);
lstOutput->Items->Add(S"and lox");
Alas, my only C++ .NET book is for 2002, so it does not cover Forms.
In the snippet below, where lstOutput is a Listbox control, I get the error:
i:\C++\C++Code\UseForm\Form1.h(121): error C2664:
'System::Windows::Forms::ListBox::ObjectCollection::Add' : cannot convert
parameter 1 from 'char *' to 'System::Object __gc *'
What do I have to do to correct the problem?
char *buffer;
buffer = "Bagels";
lstOutput->Items->Add(buffer);
lstOutput->Items->Add(S"and lox");