|
|
1.1 ! root 1: Hello, world via cout ! 2: Hello, world via cerr ! 3: enter a char:c = "a" ! 4: enter three integers (short, int, long):first = 123 via dec = 123 ! 5: second = 4567 via form = 4567 = 010727 via cout.form = 4567 = 0x11d7 ! 6: third = 89012 via hex = 15bb4 ! 7: enter a float then a double:first = 123.456 ! 8: second = -0.012 ! 9: enter 5 characters separated with spaces:first = 1 ! 10: rest = 2 3 4 5 ! 11: A 10-character buffer: abcdefghi ! 12: ! 13: Making streams sout and sin...contents of file: ! 14: Thisfilehasonelinetestingoutputstreams. ! 15: Making File tf ... first line of file: ! 16: This is the first and only line of this file. ! 17: next char = 10 ! 18: reopening tempfile, appending: Now there is a second line. ! 19: First 10 chars via raw system read after reopen for input: ! 20: This is th ! 21: Contents after raw lseek to pos 5: ! 22: is the first and only line of this file. ! 23: Now there is a second line. ! 24: ! 25: Making SFile rf...odd elements of file in reverse order: ! 26: (i = 9 c = j d = 0.009) ! 27: (i = 7 c = h d = 0.007) ! 28: (i = 5 c = f d = 0.005) ! 29: (i = 3 c = d d = 0.003) ! 30: (i = 1 c = b d = 0.001) ! 31: ! 32: Making PlotFile pf ...(You may delete or attempt to plot plot.out) ! 33: creating ostrstream... ! 34: with contents: ! 35: This is a string-based stream. ! 36: With two lines. ! 37: using it to create istrstream... ! 38: with contents: ! 39: This is a string-based stream. ! 40: With two lines. ! 41: Testing string-based stream using strstream. ! 42: ! 43: Making filebuf streams fout and fin...contents of file: ! 44: Thisfilehasonelinetestingoutputstreams. ! 45: ! 46: This is line 1 of ftmp0 ! 47: This is line 2 of ftmp0 ! 48: ! 49: This is line 1 of ftmp1 ! 50: This is line 2 of ftmp1 ! 51: ! 52: This is line 1 of ftmp2 ! 53: This is line 2 of ftmp2 ! 54: ! 55: 5.50+6.25 = 1.175e+01 ! 56: Previous line has 21 characters ! 57: Previous line has +32 characters ! 58: Final names & states: ! 59: cin: (stdin) 0 ! 60: cout: (stdout) 0 ! 61: cerr: (stderr) 0 ! 62: ! 63: end of test.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.