본문내용
소스코드
#include
#include
#include
typedef struct node{ //노드를 저장할 구조체 변수선언
int key; //노드의 키값
int data; //노드의 데이터값
struct node *parent; //노드의 부모 포인트
struct node *left; //노드의 왼쪽 자식 포인트
struct node *right; //노드의 오른쪽 자식 포인트
}node;
int main(void){
char input[10]; //키보드 입력을 저장하기 위한 배열
int num, key, data; //메뉴 선택 번호, 노드의 키, 노드의 데이타 저장 변수
node *root_node=NULL, *new_node=NULL; //루트 노드, 새로 생성하는 노드를 위한 포인터 변수
while(1){
printf(" 1. Insert Node\n");
printf(" 2. Delete Node\n");
printf(" 3. Search Node\n");
printf("====================\n");
printf("Input(end : exit) : ");
fflush(stdin);
gets(input);
#include
#include
#include
typedef struct node{ //노드를 저장할 구조체 변수선언
int key; //노드의 키값
int data; //노드의 데이터값
struct node *parent; //노드의 부모 포인트
struct node *left; //노드의 왼쪽 자식 포인트
struct node *right; //노드의 오른쪽 자식 포인트
}node;
int main(void){
char input[10]; //키보드 입력을 저장하기 위한 배열
int num, key, data; //메뉴 선택 번호, 노드의 키, 노드의 데이타 저장 변수
node *root_node=NULL, *new_node=NULL; //루트 노드, 새로 생성하는 노드를 위한 포인터 변수
while(1){
printf(" 1. Insert Node\n");
printf(" 2. Delete Node\n");
printf(" 3. Search Node\n");
printf("====================\n");
printf("Input(end : exit) : ");
fflush(stdin);
gets(input);
소개글