c++ - itoa function problem -


i'm working on eclipse inside ubuntu environment on c++ project.

i use itoa function (which works on visual studio) , compiler complains itoa undeclared.

i included <stdio.h>, <stdlib.h>, <iostream> doesn't help.

www.cplusplus.com says:

this function not defined in ansi-c , not part of c++, supported compilers.

therefore, i'd suggest don't use it. however, can achieve quite straightforwardly using stringstream follows:

stringstream ss; ss << myint; string mystring = ss.str(); 

Comments

Popular posts from this blog

List<T>().Add problem C# -

Javascript natural sort array/object and maintain index association -