#include <stdio.h>
void main()
{void cpy(char [],char []);
char sty[80][80];
printf("\ninput sting:");
gets(sty);
cpy(sty,c);
printf("\nThe vonelletters are:%s\n,c");}
void cpy(char s[],char c[])
{int i,j;
i=0;
j=0;
while(s[i]!='\0')
{if(s[i]=='a'||s[i]=='A'||s[i]=='e'||s[i]=='E'
||s[i]=='i'||s[i]=='I'||s[i]=='o'||s[i]=='O'||s[i]=='u'||s[i]=='U')
{c[j]=s[i];
j++;}
i++;}
c[j]='\0';}
警告� temp.c 7: 指针转换后指向其它类型 在函数
错误 temp.c 8: 未定义的符号'c' 在函数
警告� temp.c 8: 指针转换后指向其它类型 在函数
警告� temp.c 8: 非可移动指针任务 在函数
--------------------------------------------------
错误:1 警告:3
怎么改啊??????
先看运行结果
下面是代码:
#include <stdio.h>
#include <string.h>
void f(char str_01[],char str_02[]);
main(){
static char str_01[100],str_02[100];
gets(str_01);
f(str_01,str_02);
puts(str_02);
}
void f(char a[],char b[]){
int index=0,i=0;
char y[] = {'a','e','i','o','u'};
char c;
while((c = a[i++]) != '\0'){
int i;
for(i=0;i<5;i++){
if(c == y[i] || c == y[i]-32){
b[index++] = c;
continue;
}
}
}
}