xcode - ostringstream problem with int in c++ -


I expect the following code from output Hello5 Instead, it only outputs to Hello . It seems that there is a problem trying to output an output to ostringstream when I directly output directly to cout , I get the expected input I using XCode 3.2 on Snow Leopard

Thank you!

  #include & lt; Iostream & gt; #include & lt; String & gt; # Include & lt; Sstream & gt; using namespace std; Int main () {int myint = 5; String mystr = "hello"; String finalist; Ostringstream dew; OSS & LT; & Lt; Maestrate & Lieutenant; & Lt; Mint; Finestrate = oss.str (); Cout & lt; & Lt; Finalstr; Return 0; }  

Edit: I see the answers given below. This is created by a problem in Active Configuration 'debug' on Snow Leopard in XCode 3.2

< P> Changing the active configuration in 'XCode' with 'debug' for 'Release' functions as an alternative solution.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -