본문 바로가기

전체 글

(24)
Queue 막 구현하기 https://cplusplus.com/reference/queue/queue/ https://cplusplus.com/reference/queue/queue/ container_typeThe second template parameter (Container)Type of the underlying container cplusplus.com 기능> 1. 생성자: 기본 생성자 2. empty() : 큐가 비어있는지 체크 후 bool 타입 반환 3. size() : 큐에 저장된 데이터 갯수 integer 타입 반환 4. front() : 큐에 가장 처음에 추가한 데이터 반환 (제거 x, 수정 가능) 5. back() : 큐에 가장 마지막에 추가한 데이터 반환 (제거 x, 수정 가능) 6. push() : 큐..
Stack 막 구현해보기 https://cplusplus.com/reference/stack/stack/ https://cplusplus.com/reference/stack/stack/ container_typeThe second template parameter (Container)Type of the underlying container cplusplus.com 기능> 1. 생성자 : 기본 생성자만 추가 2. empty() : 현재 스택이 비어있는지 체크하여 Bool 타입 반환 3. size() : 현재 스택에 저장된 데이터의 갯수 Integer 타입 반환 4. top() : 가장 최근에 넣은 데이터 반환 (수정 가능) 5. push() : 스택에 데이터 추가 6. pop() : 스택에서 가장 최근 추가한 데이터 삭제 7. ..
20. 완료 프로젝트 #define _CRT_SECURE_NO_WARNINGS #include #include typedef enum _COMMAND { Exit, Add, Search, PrintAll, Remove, } COMMAND; typedef struct _USERDATA { char szName[32]; char szPhone[32]; struct _USERDATA* pNext; }USERDATA; #define FILE_NAME"PhoneBook.txt" #define PRINT_ERR_MSG(msg)printf("ERROR: %s", msg); USERDATA* phoneBook = NULL; COMMAND print_menu() { COMMAND selectMenu; printf("[1]Add\t[2]Sea..