I have a made a c++ program which uses itoa (). I compiled it on 64Bit compiler(TDM-GCC-5.1), it compiled and worked. But when i compiled it using 32 bit TDM-GCC-5.1 compiler i get the error itoa () was not declared in this scope. I tried compiling this on two different 32 bit machines still i got the same error and it by including cstdlib and stdlib.h still the same error in both the cases. It compiles and runs fine on a 64 bit machine. But why doesn't it do so on a 32 bit compiler??
Can you please suggest some alternative for 32 bit ?
code:
#include <iostream>
#include <stdlib.h>
using namespace std;
main()
{
int test;
char t[2];
itoa(test,t,10);
}
Compiler output:
C:\Users\hello\Desktop\Untitled1df.cpp In function 'int main()':
C:\Users\hello\Desktop\Untitled1df.cpp [Error] 'itoa' was not declared in this scope
Screenshot: the IDE screenshot