source:
testjes/stringstream.cpp
@
10
Last change on this file since 10 was 10, checked in by willem, 11 years ago | |
---|---|
File size: 229 bytes |
Line | |
---|---|
1 | #include <iostream> |
2 | #include <string> |
3 | #include <sstream> |
4 | #include <iomanip> |
5 | |
6 | int main() |
7 | { |
8 | std::ostringstream s; |
9 | int x=3; |
10 | |
11 | s << std::setfill('0'); |
12 | s << std::setw(8) << x; |
13 | std::cout << s.str() << std::endl; |
14 | return 0; |
15 | } |
Note: See TracBrowser
for help on using the repository browser.