|
산적 님이 쓰신 글 :
: : void sort_func(int p_number)
: : {
: : int ctr;
: : char buf[MAXSTRING];
: : for(ctr=0;ctr<p_number;ctr++)
: : {
: : if(list[ctr].name<list[ctr+1].name)
: : {
: : buf=list[ctr].name;
: : list[ctr].name=list[ctr+1].name;
: : list[ctr+1].name=buf;
: : }
: : }
: : }
:
: 위함수에서
:
: buf=list[ctr].name;
: list[ctr].name=list[ctr+1].name;
: list[ctr+1].name=buf;
:
: 이부분에서 에러가 나는데엽...
: 문자를 숫자처럼 복사 하셨네엽...
: strcpy 또는 strncpy처럼 문자복사 함수를 쓰셔야 합니다.
: 문자형 포인터가 아니면 숫자처럼 복사할수는 없슴당... 참고가 되셨기를 바랍니다.
:
: - 산적 -
:
:
:
|