如题,或者将string
类型转成const char*
也可以。
5条回答 默认 最新
- Nutkey 2022-09-01 15:28关注
#include <stdio.h> #include <iostream> using namespace std; int main(){ int x=100; char a[11]; const char *p=itoa(x,a,10); printf("%s\n",p); system("pause"); return 0; }
结果:
解决 无用评论 打赏 举报 编辑记录