데이터베이스, c언어
본 자료는 2페이지 의 미리보기를 제공합니다. 이미지를 클릭하여 주세요.
닫기
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
해당 자료는 2페이지 까지만 미리보기를 제공합니다.
2페이지 이후부터 다운로드 후 확인할 수 있습니다.

소개글

데이터베이스, c언어에 대한 보고서 자료입니다.

본문내용

---------------메인함수종료*/
void error(char *message)
{
fprintf(stderr, "%s\n", message);
exit(1);
}
void init(headerlist *list)
{
list->length = 0;
list->head = list->tail = NULL;
}
void printuser(userlist *node)
{
printf("%s%s\n",node->username, node->address);
}
void search(headerlist *list)
{
int i;
userlist *slist=list->head;
char find[size];
scanf("%s",find);
for(i=1;ilength+1;i++)
{
if(strcmp(slist->username,find)==0)
{
scanf("%s %s", slist->username, slist->address);
}
slist=slist->link;
}
}
void usernumber(headerlist *list)
{
userlist *node=list->head;
int i;
if(list->length != 0)
{
for(i=1;ilength+1;i++)
{
printuser(node);
node=node->link;
}
}
}
void adduser(headerlist *list)
{
userlist *new_node = (userlist *)malloc(sizeof(userlist));
if(new_node == NULL)
error("메모리할당실패");
if(list->tail == NULL){
list->head = list->tail = new_node;
new_node->link = new_node->link2 = new_node;
}
else{
new_node->link2 = list->tail;
list->tail->link = new_node;
list->tail = new_node;
list->head->link2 = new_node;
new_node->link=list->head;
}
list->length++;
scanf("%s %s",&new_node->username, &new_node->address);
}
void deletenode(headerlist *list, userlist *node)
{
if(list->length == 1)
init(list);
else if(node == list->head) {
list->head = node->link;
node->link->link2 = node->link2;
list->tail->link = node->link;
}
else if(node == list->tail) {
list->tail = node->link2;
node->link2->link = list->head;
list->head->link2 = list->tail;
}
else {
node->link2->link = node->link;
node->link->link2 = node->link2;
}
free(node);
list->length--;
}
void eraseuser(headerlist *list)
{
int i;
userlist *slist=list->head;
char find[size];
scanf("%s",find);
for(i=1;ilength+1;i++)
{
if(strcmp(slist->username,find)==0)
{
deletenode(list, slist);
break;
}
slist=slist->link;
}
}
  • 가격3,000
  • 페이지수8페이지
  • 등록일2012.08.31
  • 저작시기2011.8
  • 파일형식한글(hwp)
  • 자료번호#762702
본 자료는 최근 2주간 다운받은 회원이 없습니다.
청소해
다운로드 장바구니