标题:唉,没事干要求用字符指针~~想了半天只会用字符数组,请教!
只看楼主
langhua9528
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2007-5-27
得分:0 
以下是引用crz03128在2007-6-7 23:50:13的发言:

#include<stdio.h>
#include<string.h>
void main()
{
char *str1[50]="maybe you are right";
char *str2[]=" actually you are wrong!";

printf("%s",strcat(*str1,*str2));

}
编了这个,结果出错了

#include<stdio.h>
#include<string.h>
void main()
{
char str1[50]="maybe you are right";
char *str2="actually you are wrong!";

printf("%s\n",strcat(str1,str2));

}
再看一下书吧

2007-06-12 23:14



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-145809-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.026782 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved