View Single Post
Old Jan 19th, 2007, 12:19 AM   #10
lectricpharaoh
Caffeinated Neural Net
 
lectricpharaoh's Avatar
 
Join Date: Jun 2005
Location: Dry west coast of Canada
Posts: 1,031
Rep Power: 5 lectricpharaoh will become famous soon enough
You might need to explicitly 'box' the int. I'm not sure if VC++ boxes and unboxes stuff automagically, whereas C# does (which has good and bad sides). Try casting it to System::Object first, like so:
this->HoursListBox->Items->Add((System::Object)hours);
@Arevos: If managed C++ is like C#, the int type is probably an alias for System.Int32, so the changed definition would be unnecessary in that case (and fail to resolve the problem). Still, I suppose it's worth a shot, as I don't know if managed C++ behaves this way (never used it; if I'm gonna write managed code, I'll stick to C#, using C++ for native code).
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot.
- Vaarsuvius, Order of the Stick
lectricpharaoh is offline   Reply With Quote