- 有些编译器不支持itoa,因为它不是标准的。
- 解决方法
- c++11: std::to_string
- sprintf
- stdio.h
char *c = new char;
sprintf(c,"%d",num);
- stringstream
- sstream.h
stringstream ss; int x = 1;
ss << x;
string str = ss.str();
Error:‘itoa’ was not declared in this scope
最新推荐文章于 2024-08-29 10:32:00 发布