use stringstream instead to to_string

This commit is contained in:
Dale Stammen 2015-05-21 12:39:00 -07:00
parent 8bb393f16f
commit 7d0ca21167
1 changed files with 5 additions and 3 deletions

View File

@ -3,6 +3,7 @@
#include "stdlib.h"
#include <vector>
#include <sstream>
#include <iomanip>
using namespace std;
@ -35,12 +36,13 @@ void logData(const char* key)
int length = data.getSize() / sizeof(T);
std::ostringstream ss;
ss << setprecision(2) << std::fixed;
for (int i = 0; i < length; i++)
{
s << buffer[i];
s << " ";
ss << buffer[i] << " ";
}
CCLOG("%s is %s", key, ss.str());
CCLOG("%s is %s", key, ss.str().c_str());
}
template<typename T>