#3160: itoa函式不能用?


machib01850216 (marmot)


傳了2次都CE= =

已經引入標頭檔<cstdlib> <stdlib.h>

過了 還是一樣= =

/tmp/code_394741.cpp: In function ‘int main()’:
/tmp/code_394741.cpp:21: error: ‘itoa’ was not declared in this scope

是不是這個函式不支援?還是其他別的問題?

#3161: Re:itoa函式不能用?


example (學姊)


傳了2次都CE= =

已經引入標頭檔

過了 還是一樣= =

/tmp/code_394741.cpp: In function ‘int main()’:
/tmp/code_394741.cpp:21: error: ‘itoa’ was not declared in this scope

是不是這個函式不支援?還是其他別的問題?

 我直接在 Dev - C++ 裡面打 atoi()

 前面加上 stdlib.h 就可以了

 444 C:\Dev-Cpp\include\stdlib.h too few arguments to function `char* itoa(int, char*, int)' 

 _CRTIMP char* __cdecl    itoa (int, char*, int);

#3162: Re:itoa函式不能用?


example (學姊)


傳了2次都CE= =

已經引入標頭檔

過了 還是一樣= =

/tmp/code_394741.cpp: In function ‘int main()’:
/tmp/code_394741.cpp:21: error: ‘itoa’ was not declared in this scope

是不是這個函式不支援?還是其他別的問題?

 我直接在 Dev - C++ 裡面打 atoi() itoa() 這裡打錯@@

 前面加上 stdlib.h 就可以了

 444 C:\Dev-Cpp\include\stdlib.h too few arguments to function `char* itoa(int, char*, int)' 

 _CRTIMP char* __cdecl    itoa (int, char*, int);


#3171: Re:itoa函式不能用?


machib01850216 (marmot)


傳了2次都CE= =

已經引入標頭檔

過了 還是一樣= =

/tmp/code_394741.cpp: In function ‘int main()’:
/tmp/code_394741.cpp:21: error: ‘itoa’ was not declared in this scope

是不是這個函式不支援?還是其他別的問題?

 我直接在 Dev - C++ 裡面打 atoi() itoa() 這裡打錯@@

 前面加上 stdlib.h 就可以了

 444 C:\Dev-Cpp\include\stdlib.h too few arguments to function `char* itoa(int, char*, int)' 

 _CRTIMP char* __cdecl    itoa (int, char*, int);

 

DEV-CPP 上可以的 但上傳後就CE



#3172: Re:itoa函式不能用?


linishan (L)


傳了2次都CE= =

已經引入標頭檔

過了 還是一樣= =

/tmp/code_394741.cpp: In function ‘int main()’:
/tmp/code_394741.cpp:21: error: ‘itoa’ was not declared in this scope

是不是這個函式不支援?還是其他別的問題?

 我直接在 Dev - C++ 裡面打 atoi() itoa() 這裡打錯@@

 前面加上 stdlib.h 就可以了

 444 C:\Dev-Cpp\include\stdlib.h too few arguments to function `char* itoa(int, char*, int)' 

 _CRTIMP char* __cdecl    itoa (int, char*, int);

 

DEV-CPP 上可以的 但上傳後就CE





原因應該是

itoa是一個non-standard(非標準)function

所以不是所有編譯器都支援..