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

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

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