From e5332d6814e8f5ccb1e0d96b9a3e909e210a670d Mon Sep 17 00:00:00 2001 From: Jonas Suhr Christensen Date: Wed, 22 Oct 2014 15:55:07 +0200 Subject: Fixed conversion of int to string. --- plugingui/plugingui.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugingui/plugingui.cc b/plugingui/plugingui.cc index 19f6dca..c49d2fd 100644 --- a/plugingui/plugingui.cc +++ b/plugingui/plugingui.cc @@ -250,8 +250,11 @@ void PluginGUI::handleMessage(Message *msg) channels_it++) { std::string name = channels_it->first; std::string microphone = channels_it->second; - std::string count_str; - count_str << count; + + char buf[4]; + sprintf(buf, "%d", count); + std::string count_str(buf); + metadatatext.append("\t"+ count_str + ". " + name + ": " + microphone + "\n"); //C++11 only: metadatatext.append("\t"+ std::to_string(count) + ". " + name + ": " + microphone + "\n"); count++; -- cgit v1.2.3