char * myFunction () { char sub_str[10][20]; return sub_str; } void main () { char *str; str = myFunction(); }
error:return
i use that function to split a string to string array
char ** split(char *str, char *delimiter) { char *temp=strtok(str,delimiter); char *arr[]={temp}; int i=0; while(true) { elm=strtok (NULL, delimiter); if(!temp) break; arr[++i]=temp; } return arr; }