首页 > 代码库 > C++ - "'itoa' was not declared in this scope" 错误

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);




C++ - "'itoa' was not declared in this scope" 错误