编译出错,不解。求助!

jim77 2002-07-22 01:24:24
#include <iostream.h>
#include <stdlib.h>
#include <string.h>

int main()
{

int x = 123;
char y = 'a';
char* z = "bcd";
char buffer[10];

buffer = itoa(x);
int len=strlen(buffer);
buffer[len]=y;
buffer[len+1]='\0';
strcat(buffer, z);

system("pause");
return 0;
}
编译显示如下错误:Could not find a match for 'itoa(int)‘ in function main().
谢谢!!!
...全文
83 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
GZCompiler 2002-07-22
  • 打赏
  • 举报
回复
itoa()函数用错了,察看一下帮助就知道怎么用了。
ffuu 2002-07-22
  • 打赏
  • 举报
回复
我用vc调的
ffuu 2002-07-22
  • 打赏
  • 举报
回复
itoa(i,temp,10);///将i转换为字符串放入temp中,最后一个数字表示十进制
itoa(i,temp,2); ///按二进制方式转换
lak47 2002-07-22
  • 打赏
  • 举报
回复
看stdlib.h文件中iota的定义
char *_itoa( int value, char *string, int radix );
你那样用怎么行
jim77 2002-07-22
  • 打赏
  • 举报
回复
BTW :编译环境是BCC5.5

69,364

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧