天天看點

C++ - "'itoa' was not declared in this scope" 錯誤

"'itoa' was not declared in this scope" 錯誤

本文位址: http://blog.csdn.net/caroline_wendy

itoa函數不是ANSI(American National Standards Institute) C的标準, 應該避免使用這個函數.

簡易替代版本為:

//itoa(i, s, 10);
snprintf(s, sizeof(s), "%d", i);           

繼續閱讀