ADT
arm-eh
ast-experimental
enum
forall-pointer-decay
jacob/cs343-translation
new-ast-unique-expr
pthread-emulation
qualifiedEnum
Last change
on this file since ef3ac46 was fec63b2, checked in by Peter A. Buhr <pabuhr@…>, 4 years ago |
add first draft of strstream type
|
-
Property mode
set to
100644
|
File size:
384 bytes
|
Line | |
---|
1 | #include <fstream.hfa>
|
---|
2 | #include <strstream.hfa>
|
---|
3 |
|
---|
4 | int main() {
|
---|
5 | enum { size = 256 };
|
---|
6 | char buf[size];
|
---|
7 | strstream sstr = { buf, size };
|
---|
8 | int i = 3, j = 5, k = 7;
|
---|
9 | double x = 12345678.9, y = 98765.4321e-11;
|
---|
10 |
|
---|
11 | sstr | i | hex(j) | wd(10, k) | sci(x) | unit(eng(y));
|
---|
12 | write( sstr );
|
---|
13 | printf( "%s", buf );
|
---|
14 | sout | i | hex(j) | wd(10, k) | sci(x) | unit(eng(y));
|
---|
15 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.