c_-_c_string_streams:ostrstream
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
c_-_c_string_streams:ostrstream [2017/10/12 13:09] – peter | c_-_c_string_streams:ostrstream [2017/10/12 13:19] (current) – removed peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== C - C++ Streams - ostrstream ====== | ||
- | |||
- | <code cpp> | ||
- | #include < | ||
- | #include < | ||
- | using namespace std; | ||
- | |||
- | int main() | ||
- | { | ||
- | char str[80]; | ||
- | |||
- | ostrstream outs(str, sizeof(str)); | ||
- | |||
- | outs << " | ||
- | outs << 27 << " " | ||
- | outs << ends; // null terminate | ||
- | |||
- | cout << outs.pcount(); | ||
- | |||
- | cout << " " << str; | ||
- | |||
- | return 0; | ||
- | } | ||
- | </ | ||
c_-_c_string_streams/ostrstream.1507813789.txt.gz · Last modified: 2020/07/15 09:30 (external edit)