Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- unalias
- php
- 단축키
- 월별 카운트
- cocos2d-x
- Get
- 점점변하는값
- application.mk
- is_array
- mysql
- android studio
- mathemetica
- 하이퍼 터미널
- 현재언어
- halliday
- Avr
- 0x
- array
- Call
- Post
- PORTG
- selectc
- SQL
- solution
- C++
- function
- Join
- 파일존재
- 강좌
- Java
Archives
- Today
- Total
목록Circular (1)
코딩도사의 코드정리
Circular Queue 배열 구현 클래스
template class CircularQueue { private: Node* node; // 노드 배열 int capacity; // 큐의 용량 int front; // 전단의 인덱스 int rear; // 후단의 인덱스 public: CircularQueue(int capacity) { this->capacity = capacity + 1; // 노드 배열의 크기는 실제 용량에서 1을 더한 크기 (더미 공간 때문) node = new Node[this->capacity]; // Node 구조체 capacity + 1개를 메모리 공간에 할당한다 front = 0; rear = 0; // 전단과 후단의 초기화 } ~CircularQueue() { delete []node; // 노드 배열 소멸 } v..
컴퓨터 이야기/C++
2015. 12. 9. 06:00