I need to convert integers to strings. Can anyone tell me how would I go about doing this as I am very much stumped :(.
std::stringstream[1].
References:
[1]http://www.cplusplus.com/reference/iostream/stringstream/
Wazzak
Last edited on
Peter 87 I tried to use std::to_string but got the error: "to string is not a member of std". Am I missing a header? I have included:
#include <cstdlib>
#include <iostream>
#include <stdio.h>
#include <fstream>
#include <string>
#include <vector>
#include <stdio.h>
#include <cmath>
but I'm guess std has something to do with the namespace?
Can anyone clarify this for me?
It's more likely that your compiler isn't C++11 compliant.
I'm using Visual Studio 2008? And thank you Moooce I'll take a look now
Last edited on
The most funny that the MS VC++ 2010 contains a bug and if you will use std::to_string for a object of type int your code will not be compiled.:)