471,123 Members | 873 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,123 software developers and data experts.

.NET C++ Trouble adding to listbox

I'm a .NET newbie I will admit it. I have moderate experience in VB6 and am a decent C programmer. I recently got ahold of Visual Studio .NET and was asked to write a project using C++ .NET I created a simple ListBox and tried to add an item to it on the fly and I get a compile error about unmanaged vs managed arguments. My code is simple.


this gives me the error. If I replace the "Hello" text with text from a textbox then it works fine, but this is not what I want to do. Any suggestions? I have also tried to prefix the argument in the Add method with an 'L' which also did not work. Thanks.

vr, Xei
Jul 28 '06 #1
4 3707
Anyone have an input on this one??
Aug 3 '06 #2
Is this thing on?
Aug 5 '06 #3
lol, yeah its on.

I've tried doing what your trying to do myself, only to get some error and its working with textbox, but not strings of any kind.

But then again, I don't know much C++.

Someone must know...anyone?
Aug 5 '06 #4
lol, just googled around a bit and I think I found something:


The example somewhere on this page preceds the string with a capital 'S', worked for me :P
Aug 5 '06 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Husam | last post: by
6 posts views Thread by Papa.Coen | last post: by
14 posts views Thread by Paul_Madden via DotNetMonster.com | last post: by
1 post views Thread by =?Utf-8?B?Sm9zaFA=?= | last post: by
2 posts views Thread by =?Utf-8?B?TWFobW91ZCBTaGFiYW4=?= | last post: by
4 posts views Thread by ranjini ns | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.