From 9d20d1a07fa10623f4ed1655806cb57075443ae7 Mon Sep 17 00:00:00 2001 From: William Woodall Date: Tue, 30 Jul 2013 11:04:16 -0700 Subject: [PATCH] convert wstring into string when printing --- src/impl/win.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/impl/win.cc b/src/impl/win.cc index 7a27d95..acf281a 100644 --- a/src/impl/win.cc +++ b/src/impl/win.cc @@ -62,7 +62,8 @@ Serial::SerialImpl::open () stringstream ss; switch (errno_) { case ERROR_FILE_NOT_FOUND: - ss << "Specified port, " << port_ << ", does not exist."; + // Use this->getPort to convert to a std::string + ss << "Specified port, " << this->getPort() << ", does not exist."; THROW (IOException, ss.str().c_str()); default: ss << "Unknown error opening the serial port: " << errno;