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); } }