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
9 enter 5 characters separated with spaces:first = 1
11 A 10-character buffer: abcdefghi
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.
18 reopening tempfile, appending: Now there is a second line.
19 First 10 chars via raw system read after reopen for input:
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.
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)
32 Making PlotFile pf ...(You may delete or attempt to plot plot.out)
33 creating ostrstream...
35 This is a string-based stream.
37 using it to create istrstream...
39 This is a string-based stream.
41 Testing string-based stream using strstream.
43 Making filebuf streams fout and fin...contents of file:
44 Thisfilehasonelinetestingoutputstreams.
46 This is line 1 of ftmp0
47 This is line 2 of ftmp0
49 This is line 1 of ftmp1
50 This is line 2 of ftmp1
52 This is line 1 of ftmp2
53 This is line 2 of ftmp2
56 Previous line has 21 characters
57 Previous line has +32 characters
58 +__34567(dec) = 0x__8707(hex) = _0103407(oct) [showbase on]
59 +__34567(dec) = ____8707(hex) = __103407(oct) [showbase off]
60 -__34567(dec) = 0x__78f9(hex) = __074371(oct) [showbase on]
61 -__34567(dec) = ____78f9(hex) = ___74371(oct) [showbase off]
62 ______+0(dec) = _____0x0(hex) = _______0(oct) [showbase on]
63 ______+0(dec) = _______0(hex) = _______0(oct) [showbase off]
64 ___34567(dec) = __0X8707(hex) = _0103407(oct) [showbase on]
65 ___34567(dec) = ____8707(hex) = __103407(oct) [showbase off]
66 -34567__(dec) = 0X78F9__(hex) = 074371__(oct) [showbase on]
67 -34567__(dec) = 78F9____(hex) = 74371___(oct) [showbase off]
68 0 (dec) = 0X0 (hex) = 0 (oct) [showbase on]
69 0 (dec) = 0 (hex) = 0 (oct) [showbase off]