#include?<stdio.h>
#include?<string.h>
#include?<stdlib.h>
#include?<malloc.h>
int?main(){
????char?(*s)[1000];
????char?*p;
????char?*bob;
????int?length;
????scanf("%s",s);
bob=(const?char?*)malloc(sizeof(s));
????p=strchr(s,'a');
????if(p)
????????printf("%s",p);
????else
????????printf("Not?Found!");
????return?0;
}
我想把其中的數組s變成const char*,怎么利用malloc,或者有其他的辦法
mrs_empress
2016-11-19 00:01:02