= = 哪里错了?总说我int 用得不对。。。
程序代码:
# include <stdio.h> int main() { int strSub(char * s, int start, int length, char * sSub); char c[6]; int k[6]; int i; printf("请输入六个字母:\n"); for(i=0;i<6;i++) scanf("%c",&c[i]); k[i]=int strSub(char * s, int start, int length, char * sSub); for(i=0;i<6;i++) printf("%c",k[i]); return 0; } int strSub(char * s, int start, int length, char * sSub) { int i,j; char c[6],h,b[6]; printf("请选择start的下标(务必小于5):\n"); scanf("%d",&start); s=&c[start]; printf("请输入所取字符的长度:\n"); scanf("%d",&length); for(i=start,j=0;i<start+length,j<6;i++,j++) { * sSub=* s; b[j]=* sSub; start++; } return(b[j]); }