void read_func(char **s) {
char temp[255];
FILE *read = NULL;
read = fopen("no.txt", "rt");
fscanf(read, "%s", temp);
fclose(read);
*s = (char*)malloc( strlen(temp) + 1 );
strcpy(*s, temp);
}
main() {
char *read_str = NULL;
read_func(&read_str);
printf("%s", read_str);
free(read_str);
}
이게 바로 하나를 알려주면 둘을 아는 천재의 조짐인가연?
http://dblack.tk
커뮤니티 사이트 입니다 많은 이용 부탁 드립니다.