Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - SillySquirrel

Pages: [1]
1
I update mingw for version 4.8.1 TDM but problem with std::to_string() not resolves
Here i found some fix (not work for me actually)

PS -std=c++11 of course

PPS I found the problem. IDE global compile vars set c++0x at the end of command line options
Code: [Select]
mingw32-g++.exe -std=c++11 -Wzero-as-null-pointer-constant -std=c++0x -ID:\SFML\INCLUDE -ID:\SFML\lib -c D:\TEST\main.cpp -o obj\Debug\main.o
LOL

2
i use std::to_string before but gets error to_sting isn't std member on gcc 4.7.1 :(

I thought SFML has some typecasting method

Thx for fast anwser ;)

3
Hi guys my question in subject
I use template for it

Code: [Select]
#include <string>
#include <sstream>

template <typename T>
std::string toString(T val)
{
    std::ostringstream oss;
    oss<< val;
    return oss.str();
}

template<typename T>
T fromString(const std::string& s)
{
  std::istringstream iss(s);
  T res;
  iss >> res;
  return res;
}

I think must be easier way

Pages: [1]
anything