From 93a232d3e0e9398b0bde3425b86cf8ce78e302d1 Mon Sep 17 00:00:00 2001 From: Davis King Date: Sat, 17 Nov 2012 14:55:49 -0500 Subject: [PATCH] Fixed bugs in examples. --- examples/iosockstream_ex.cpp | 2 +- examples/server_iostream_ex.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/iosockstream_ex.cpp b/examples/iosockstream_ex.cpp index 745e56fed..50cf27acc 100644 --- a/examples/iosockstream_ex.cpp +++ b/examples/iosockstream_ex.cpp @@ -35,7 +35,7 @@ int main() // Here we print each character we get back one at a time. while (stream.peek() != EOF) { - ch = (char)stream.get(); + cout << (char)stream.get(); } } catch (exception& e) diff --git a/examples/server_iostream_ex.cpp b/examples/server_iostream_ex.cpp index 402b4c622..b5ece3e3f 100644 --- a/examples/server_iostream_ex.cpp +++ b/examples/server_iostream_ex.cpp @@ -56,7 +56,7 @@ class serv : public server_iostream char ch = in.get(); // now echo it back to them - out << toupper(ch); + out << (char)toupper(ch); } }