summaryrefslogtreecommitdiff
path: root/examples/C++NPv1/Logging_Client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/C++NPv1/Logging_Client.cpp')
-rw-r--r--examples/C++NPv1/Logging_Client.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/examples/C++NPv1/Logging_Client.cpp b/examples/C++NPv1/Logging_Client.cpp
index d30946fe7ff..1b2c8a5c540 100644
--- a/examples/C++NPv1/Logging_Client.cpp
+++ b/examples/C++NPv1/Logging_Client.cpp
@@ -132,9 +132,16 @@ int main (int argc, char *argv[])
cin.width (ACE_Log_Record::MAXLOGMSGLEN);
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 (!cin || cin.eof ()) break;
ACE_Time_Value now (ACE_OS::gettimeofday ());