From: Andrea Bocci <fwyzard@inwind.it>
To: "Jessee, Mark" <Mark.Jessee@gdcanada.com>
Cc: "'Moore, Mathew L'" <MooreML@BATTELLE.ORG>,
"Jessee, Mark" <Mark.Jessee@gdcanada.com>,
"'gcc-help@gcc.gnu.org'" <gcc-help@gcc.gnu.org>
Subject: RE: Problems with stringstream
Date: Mon, 28 Oct 2002 03:07:00 -0000 [thread overview]
Message-ID: <5.1.1.6.2.20021028120404.00b5e8d8@popmail.libero.it> (raw)
In-Reply-To: <83E3831A88E65844B01DB1A73FB66F93023BBBAC@CSDNT99.cdcgy.com >
At 10.48 25/10/2002 -0600, Jessee, Mark wrote:
>Matt,
>
>Your example fails as well. But I found if I modify it a bit (see below),
>it works fine. Still not sure why though. Thoughts? Something to do with
>flushing the stream?
I guess you're right.
Probably the standard out is not automatially flushed at the end of the
program, so you don't get the last output.
Does this...
#include <iostream>
#include <sstream>
#include <string>
using namespace std;
int main ()
{
stringstream oss;
string mystr;
oss << "Sample string";
mystr=oss.str();
cout << mystr << endl; // flushes stdout
return 0;
}
...work ?
fwyzard
next parent reply other threads:[~2002-10-28 11:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <83E3831A88E65844B01DB1A73FB66F93023BBBAC@CSDNT99.cdcgy.com >
2002-10-28 3:07 ` Andrea Bocci [this message]
2002-10-25 10:15 Moore, Mathew L
-- strict thread matches above, loose matches on Subject: below --
2002-10-25 9:49 Jessee, Mark
2002-10-25 9:58 ` bjorn rohde jensen
2002-10-25 9:43 Moore, Mathew L
2002-10-25 9:31 Jessee, Mark
2002-10-25 9:11 Jessee, Mark
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5.1.1.6.2.20021028120404.00b5e8d8@popmail.libero.it \
--to=fwyzard@inwind.it \
--cc=Mark.Jessee@gdcanada.com \
--cc=MooreML@BATTELLE.ORG \
--cc=gcc-help@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).