• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
ostringstream problem with Xcode 3.2
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ostringstream problem with Xcode 3.2


  • Subject: ostringstream problem with Xcode 3.2
  • From: Dmitry Markman <email@hidden>
  • Date: Sat, 03 Oct 2009 14:46:02 -0400

Hi
I created new project (from c++ stdc++ template)

and I got weird problem.

the following code

    std::ostringstream os
    int d = 65;
    os << "d = " << d;
    std::cout << os.str()  << std::endl;

returns just   "d = ", I expect to have "d = 65"

so what am I doing wrong?

if I compile that code from terminal
g++ ostringstream.cpp
./a.out
sends to terminal right string

which g++
/usr/bin/g++

ls -la /usr/bin/g++
lrwxr-xr-x  1 root  wheel  7 Aug 28 23:41 /usr/bin/g++ -> g++-4.2

g++ --version
i686-apple-darwin10-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5646)


thanks



Dmitry Markman

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: ostringstream problem with Xcode 3.2
      • From: Todd Heberlein <email@hidden>
  • Prev by Date: Re: Documentation sets don't seem to be available
  • Next by Date: Re: (no subject)
  • Previous by thread: Re: Documentation sets don't seem to be available
  • Next by thread: Re: ostringstream problem with Xcode 3.2
  • Index(es):
    • Date
    • Thread