string class in Microsoft visual Studio 2005

B

bor_kev

Hi!


I am developing under Microsoft visual Studio 2005 in C++.
In my code I use the std:: string class and when I compile I don't
have any mistakes. However, when I debug my program (with
breakpoints) and i try to see the content of my std:: strings , i get
this comment : "undefined value", that means that this
type(std::string) compiles but doesn't work since i don't get real
values in it...
Then, I decided to use the System :: String class, but the problem is
: when u use this kind of strings in a class, this class has to be
managed...which isn't the case for me (unmanaged code) and i really
don't want to turn my code into managed code.

My question is : What can i do to keep unmanaged code and to use a
string class that works ?

Sincerely

bor_kev
 
B

Bo Persson

bor_kev said:
Hi!


I am developing under Microsoft visual Studio 2005 in C++.
In my code I use the std:: string class and when I compile I don't
have any mistakes. However, when I debug my program (with
breakpoints) and i try to see the content of my std:: strings , i get
this comment : "undefined value", that means that this
type(std::string) compiles but doesn't work since i don't get real
values in it...
Then, I decided to use the System :: String class, but the problem is
: when u use this kind of strings in a class, this class has to be
managed...which isn't the case for me (unmanaged code) and i really
don't want to turn my code into managed code.

My question is : What can i do to keep unmanaged code and to use a
string class that works ?

The std::string works very well, the debugger might not. Thought this
would have been fixed by now!

sdt::string stores the value in different ways depending on how long the
string is. If you look inside the string, you will find the value either
in _Bx._Buf or at the location pointed to by _Bx._Ptr.



Bo Persson
 

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

Top