[공학]스택과 큐에 대해서
- 최초 등록일
- 2006.11.22
- 최종 저작일
- 2005.10
- 11페이지/ 한컴오피스
- 가격 1,000원
소개글
스택과 큐에 대해서입니다
컴파일 실행환경
Microsoft visual c++
본문내용
main부분
#include <stdio.h>
#include <conio.h>
#include <iostream.h>
#include "Queue.h"
#include "Stack.h"
int main()
{
int a,x;
Stack<int> s(100); // 100개의 스택생성
Queue<int> q(100); // 100개의 큐 생성
while(1)
{
cout << "<---- M E N U ---->" << endl;
cout << "1. 스택에 삽입 2. 큐에 삽입" << endl;
cout << "3. 스택에서 삭제 4. 큐에서 삭제" << endl;
cout << "5. 스택 내용 보기 6. 큐 내용 보기" << endl;
cout << "7. 종료" << endl;
cout << "선택할메뉴 : ";
cin>>a;
if(a<3)
{
cout << "입력한 값은 : ";
cin >> x;
cout << endl;
}
참고 자료
없음