37#ifndef _RWSTD_STRICT_ANSI
42 const char*
const fname = 0;
49 const char*
const fname = std::tmpnam (fnamebuf);
57 typedef std::basic_istream<char, std::char_traits<char> > Input;
58 typedef std::basic_ofstream<Input::char_type, Input::traits_type> Output;
60 Input::char_type
s [200];
63 Output
out (fname, std::ios::in | std::ios::out | std::ios::trunc);
66 Input
in (
out.rdbuf ());
72 out <<
"He lifted his head and pondered.\n"
73 <<
x <<
'\n' <<
i <<
'\n';
79 in.getline (
s,
sizeof s);
83 in.seekg (0, std::ios::beg);
86 std::cout <<
in.rdbuf ();
93 in.getline (
s,
sizeof s / 2);
95 std::cout <<
s <<
'\n';
98 in.getline (
s,
sizeof s / 2);
100 std::cout <<
s <<
'\n';
107 in.get (
s,
sizeof s / 2);
112 std::cout <<
s <<
'\n';
116 in.get (
s,
sizeof s / 2);
118 std::cout <<
s <<
'\n';
126 out <<
"\nreplace the int\n";
132 const Input::int_type eof = Input::traits_type::eof ();
136 while (!Input::traits_type::eq_int_type (
in.peek (), eof))
137 std::cout << Input::traits_type::to_char_type (
in.get ());
139 std::cout <<
"\n\n\n";