"object reference not set to an instance of an object"

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

Guest

Hi,

I'm trying to add an object to a checked listbox using VC++2005 Express.

I tries adding a managed String (String ^) and objects that implement their
own version of the ToString() method. I always get the same error message:
"object reference not set to an instance of an object". The objects are
initialized and I can see them and their content in the debugger -
everything's fine until I hit the myListBox->Items->Add(myString,false);
instruction and the exception triggers...

Any ideas on how to get this working?
 

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