summaryrefslogtreecommitdiff
path: root/examples/C++NPv2/TP_Reactor_Logging_Server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/C++NPv2/TP_Reactor_Logging_Server.cpp')
-rw-r--r--examples/C++NPv2/TP_Reactor_Logging_Server.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/C++NPv2/TP_Reactor_Logging_Server.cpp b/examples/C++NPv2/TP_Reactor_Logging_Server.cpp
index 6e451953c75..75981eba6a7 100644
--- a/examples/C++NPv2/TP_Reactor_Logging_Server.cpp
+++ b/examples/C++NPv2/TP_Reactor_Logging_Server.cpp
@@ -71,8 +71,13 @@ static ACE_THR_FUNC_RETURN controller (void *arg) {
}
#else
for (;;) {
+#if defined (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB) && (ACE_USES_STD_NAMESPACE_ FOR_STDCPP_LIB == 0)
+ string user_input;
+ getline (cin, user_input, '\n');
+#else
std::string user_input;
std::getline (cin, user_input, '\n');
+#endif
if (user_input == "quit") {
reactor->notify (quit_handler);
break;