Z
Zachary Turner
How do I flush a strstream buffer so that the next time I call .str() I
get back an empty string?
Thanks
get back an empty string?
Thanks
Zachary said:How do I flush a strstream buffer so that the next time I call .str() I
get back an empty string?
Zachary Turner said:Yeah I actually meant stringstream. I don't use strstream. Anyway
funny that the solution is so trivial. I looked in MSDN help for ages
(using Visual C++) and it honest to god just doesn't mention that
overload of the str() function.
Mike Wahler said:[...]
basic_string<E, T, A>& str();
void str(const basic_string<E, T, A>& x);
Looks like two overloads to me.![]()
Victor Bazarov said:Mike Wahler said:[...]
basic_string<E, T, A>& str();
void str(const basic_string<E, T, A>& x);
Looks like two overloads to me.![]()
Are you kiddin'? One name is written aaaall the way to the right
and the other - aaaaalll the way to the left. Overload my foot!...
Howard said:Victor Bazarov said:Mike Wahler said:[...]
basic_string<E, T, A>& str();
void str(const basic_string<E, T, A>& x);
Looks like two overloads to me.![]()
Are you kiddin'? One name is written aaaall the way to the right
and the other - aaaaalll the way to the left. Overload my foot!...
Hey, don't laugh! I must have stared at that code for 2-3 minutes before I
spotted that first overload. Which is why, I think, my boss always formats
his code so that the identifiers (i.e., "str" in this case) line up in a
single column. It's too weird for me, but at least he can find the member
names quickly.
Mike said:[...]
Long, long ago, in a galaxy far far away, I was [...]
Victor Bazarov said:Mike said:[...]
Long, long ago, in a galaxy far far away, I was [...]
Ah, that's where you're from![]()
Mike said:Mike said:[...]
Long, long ago, in a galaxy far far away, I was [...]
Ah, that's where you're from![]()
No, I just went to school there. Helluva commute. ;-)
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.