没有逻辑错误,求大家给解答,但运行不了
#include<stdio.h>#include<string.h>
void delAfterStar(char *);
void delPreStar(char *);
void delAllStar(char *);
void delAllstar(char *p)
{
int i,j = 0;
for(i = 0;p[i]; i++)
if(p[i] != '*')
{
p[j] = p[i];
j++;
}
p[j] = 0;
}
void delPreStar(char *p)
{
int i,j;
for(i = 0;p[i] == '*';i++)
;
for(j = i;p[j];j++)
p[j - i] = p[j];
p[j - i] = 0;
}
void delAfterStar(char *p)
{
int count,i;
count = strlen(p);
for(i = count - 1;p[i] == '*';i--)
;
i++;
p[i] = 0;
}
void main(void)
{
char s[80];
gets(s);
puts(s);
// delAfterStar(s);
// puts(s);
// delPreStar(s);
delAllStar(s);
puts(s);
}--------------------Configuration: ÐǺŠ- Win32 Debug--------------------
Linking...
ÐǺÅ.obj : error LNK2001: unresolved external symbol _delAllStar
Debug/ÐǺÅ.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
ÐǺÅ.exe - 2 error(s), 0 warning(s)