ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change
on this file since b2fc7ad9 was
c7015e6b,
checked in by Peter A. Buhr <pabuhr@…>, 3 years ago
|
renaming, comment out non-working istrstream
|
-
Property mode set to
100644
|
File size:
533 bytes
|
Rev | Line | |
---|
[fec63b2] | 1 | #include <fstream.hfa> |
---|
| 2 | #include <strstream.hfa> |
---|
| 3 | |
---|
| 4 | int main() { |
---|
| 5 | enum { size = 256 }; |
---|
| 6 | char buf[size]; |
---|
[c7015e6b] | 7 | ostrstream osstr = { buf, size }; |
---|
[fec63b2] | 8 | int i = 3, j = 5, k = 7; |
---|
| 9 | double x = 12345678.9, y = 98765.4321e-11; |
---|
| 10 | |
---|
[c7015e6b] | 11 | osstr | i | hex(j) | wd(10, k) | sci(x) | unit(eng(y)); |
---|
| 12 | write( osstr ); |
---|
[fec63b2] | 13 | printf( "%s", buf ); |
---|
| 14 | sout | i | hex(j) | wd(10, k) | sci(x) | unit(eng(y)); |
---|
[c7015e6b] | 15 | |
---|
| 16 | // char buf2[] = "12 14 15 3.5 7e4"; |
---|
| 17 | // istrstream isstr = { buf2 }; |
---|
| 18 | // isstr | i | j | k | x | y; |
---|
| 19 | // sout | i | j | k | x | y; |
---|
[fec63b2] | 20 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.