소개글
c언어로 구현한 스택과 큐 자료구조입니다..
배열과 연결리스트도 사용했습니다
(***Turbo c++로 작업한 프로그램입니다..
VC++로 컴파일해쓸경우 알 수 없는 에러가 한 개 나네요..
이유는 저도 아직 잘 ^^;; Turbo c++로 컴파일해보세요~!!
잘돌아간답니다.. 그리고,, 몇개의 warning이 뜨는데요.. 그건 굳이 신경안쓰셔도 되지만,,굳이 고치고싶으시다면
"#include stdio.h"밑에 "#include stdlib.h"를 넣어주시면, 해결됩니다.. 물론, stdlib.h는 괄호안에 넣어야되는거 아시죠?
목차
없음
본문내용
#include <stdio.h>
// 배열 스택
int stack[10];
int stack_top=0;
void a_s_push(int element)
{
stack[stack_top]=element;
stack_top++;
}
int a_s_pop()
{
int pop;
pop=stack[stack_top-1];
stack[stack_top]=NULL;
stack_top--;
return pop;
}
int a_s_retrieve()
{
int result;
result=stack[stack_top];
return(result);}
참고 자료
없음