| [ CnUnix ] in KIDS 글 쓴 이(By): guest (pin) <dor206103.kaist.> 날 짜 (Date): 2002년 9월 19일 목요일 오후 03시 17분 50초 제 목(Title): Re: [C기초질문] -_-; char *str[]={"abcd", "efgh", "adfadfa", "adfadfa", NULL}; test2(char **tmp) { printf("%s\n",str[1]); *tmp=str[1]; printf("%s\n",*tmp); } int main() { char *tmp; test2(&tmp); printf("%s\n", tmp); } 제대로 되게 바꿨습니다. test2에서 바꾸길 원하는 것이 tmp변수값이므로 tmp의 포인터를 넘겨야죠. |