   std::string can't assign long string(150+ chars)
  Is this a bug or problem on the VC.NET 2002 STL compiler? For some very weird reason, I can''t assign a long string value to a string variable. Even hardcoding it fails for some very weird reason.The value the variable gets is around 157 characters long, and it''s in the format off:string str = "Insert long string here for testing purpose";When looking in the autos/local watch window, the value of str differs from p%2 to x&2. Anyone has a clue?Toolmaker   -Earth is 98% full. Please delete anybody you can. 
  Well I can successfully load a 200 character long value into a std::string on my copy of .NET 2002, and everything seems to work properly. For that matter I''ve used multiple kilobyte long strings in the past and have had no problems. ;  I''ve never had a problem like that either. In what way does it fail?   "Sneftel is correct, if rather vulgar." --Flarelocke ;  The string may appear oddly in the debug menu because it''s actually a 16 byte structure - if the string is less than 16 bytes, it''s allocated inline, otherwise, it contains a pointer plus some other info.  Your debugger window is probably showing you the 16 byte struct, rather than the real string.  Try putting mystr.c_str() in the watch window. ;  The output inside my game is borked aswell. I assumed it would work when testing my code. But when I came to the point where the string was outputted, it just outputted some small borked text.Toolmaker   -Earth is 98% full. Please delete anybody you can. ;  Then you''re probably smashing your stack somewhere ;  strip down your code to a minimal example that still has the problem and post it here. ;  ok, here is my code example, from the same app(Yes, it runs in a console for easy code debug output. #include <iostream>#include <string>#include <conio.h>//#include "Server.h"using namespace std;int main(){    string str = "On the left of you are several waiting chairs placed in a U form. In the middle is a small table with several magazines. On the right is an empty reception desk. You hear several women scream in the distance of the hall ahead of you";    return (0);}Ok, forget the text, but it''s the actual text from one of the MUD rooms. str contains some random weird error.Toolmaker   -Earth is 98% full. Please delete anybody you can. ;  Thanks Toolmaker. What problem does that code reproduce?Are you talking about a problem with your debugger and environment or is this code not doing what it should? At the moment it isn''t doing anything so I can''t see that it would be a problem to have it in your program.Add to the code so that it does something (such as printing out the string) and then tell us what you expected and what it actually did. ;  Still no problems with your source code on my copy of .NET 2002. The string seems to initialize fine, the data inside looks good via watch and I can re-output it with no issues. 