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

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -