How to use char[] or char* strings with ListBox ... Add()

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

How can I easily use char strings to display text in listbox. I need to do
something like:

char MyText[] = "The text";

MyListBox->Items->Add(MyText);

Thanks,

Hugo
 
Hugo,
How can I easily use char strings to display text in listbox. I need to do
something like:

char MyText[] = "The text";

MyListBox->Items->Add(MyText);

Are you talking about Managed C++?

If so, just doing MyListBox->Items->Add(new String(MyText)); should be
enough...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top