运行不出来
追答#include *-*
void main()
{ char s[80]; int i,j;
printf("Enter a string: "); gets(s);
printf("The original string: "); puts(s);
for(i=j=0; s[i]!='\0'; i++)
{
if(s[i]!='c')
{s[j]=s[i];j++;}
}
s[j]='\0';
printf("The string after deleted : "); puts(s);printf("\n\n");
}
不能运行啊
追答我在DEV C++平台下可以运行呀,你什么平台?
追问Visual C++
追答你是新建了一个控制台应用程序吧,写在.cpp里面吧?要不你把报的错误发过来,我看看
追问G:\c\14\bbb.cpp(3) : warning C4518: 'int ' : storage-class or type specifier(s) unexpected here; ignored
G:\c\14\bbb.cpp(3) : error C2146: syntax error : missing ';' before identifier 'fun'
G:\c\14\bbb.cpp(3) : fatal error C1004: unexpected end of file found
上面加了两行