:( :S
tostring() make me mad..

Maybe because there is no such standard C or C++ function.

to convert to a string use this function :

#include <string>
#include <sstream>
#include <iostream>

using namespace std;


template<typename T>
string toString(const T& arg){
 std::streamstream ss;
 ss << arg;
 return ss.str();
}

int main(){
 cout << toString(123) << endl;
 cout << toString(12.345) << endl;
}

:) ok now pizz tell me proper definition of this pointer

commented: wut? -2
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.