标题:C一道题,报错
取消只看楼主
zdx877
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2013-1-27
结帖率:33.33%
已结贴  问题点数:10 回复次数:0 
C一道题,报错
#include<stdio.h>
#include<ctype.h>
#include<string.h>
int fun (char *str)
{
    int i,j=0;
        for(i=0;str[i]!='\0';i++)
        if(str[i]!='')str[j++]=str[i]; 报错位置在这行,找了半天都查不出原因
        str[j]='\0';
}
void main()
{
    char str[81];
    int n;
    printf("Input a string: ");
    gets(str);
    puts(str);
    fun(str);
    printf("%s\n",str);
}



报错语句
error C2137: empty character constant
搜索更多相关主题的帖子: include character void fun 
2013-02-22 23:04



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




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

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