Turbo-C
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
터보-C 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
Lua 게시판
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
볼랜드포럼 광고 모집

C/C++ Q/A
[6169] 구조체 포인터 관련 급질입니다.
khnet [khnet] 2596 읽음    2008-04-06 10:15
도저히 이해가 안가는 부분이 있어서...


struct list {
int no;
struct list *shortlink;
};
typedef struct list node;

node *head=NULL;

int deletenode(int rno)
{
node *current=head;
node *newnode=head;
node *temp;

if(current->no==rno)
{
newnode=current;
current=current->shortlink;
head=current;
return(1);
}
else
{
while(newnode->shortlink->shortlink!=NULL)
{
if(newnode->shortlink->no==rno)
temp=newnode->shortlink;
newnode->shortlink=newnode->shortlink->shortlink;
head=current;
return(1);
}
newnode=newnode->shortlink;
}
if(newnode->shortlink->shortlink==NULL && newnode->shortlink->no==rno)
newnode->shortlink=NULL;
head=current;
return(1);
}
else return(0);
}
}

여기서 newnode->shortlink->shortlink가 무슨 의미죠?--;
이중 구조체도 아닌데...  이런식의 표현은 너무 생소해서...
그리고 return(1), return(0)은 rno값으로 1이랑 0을 되돌린다는 뜻인가요?
그리고 전체적인 뭘하는 프로그램인지도 감이 안잡히네요..
부디 알려주시면 감사드리겠습니다.
많이 급하니 최대한 빠른 답변 부탁드립니다.(__)

+ -

관련 글 리스트
6169 구조체 포인터 관련 급질입니다. khnet 2596 2008/04/06
6170     Re:구조체 포인터 관련 급질입니다. 남병철.레조 8744 2008/04/07
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.