목차
[Debug]
STACK.dsp
STACK.dsw
STACK.ncb
STACK.opt
STACK.plg
STACK.CPP
1.10MB
파일 13, 폴더 1
STACK.dsp
STACK.dsw
STACK.ncb
STACK.opt
STACK.plg
STACK.CPP
1.10MB
파일 13, 폴더 1
본문내용
STACK.CPP
// *********
// * STACK *
// *********
//배열로 저장공간을 잡고 top이라는 포인터로 입력 받아서 array[]에 직접 저장하는 방식으로 구현
#include
#include
void Input(); //데이타 입력
void Delete(); //데이타 삭제
void Exit(); //종료 하는 함수
void Exception(); //1,2,9번을 제외한 나머지 번호를 입력했을때 호출하는 함수
void Print(); //출력함수
int array[10]; //스택 저장 공간
int *top,*base,*limit;
//top은 배열에 주소를 가르킨다. 입력할때는 주소를 증가시켜서 입력받고,
//삭제시 주소를 감소시켜 입력받는다.
//base는 배열의 가장 밑의 주소(고정)
//limit는 배열의 가장 위의 주소(고정)
void main()
{
limit=&array[9];
base=&array[0];
top=base-1; //top은 base가 가지는 배열의 가장 밑의 주소값보다 하나(4byte)아래
int num;
printf("*********\n");
printf("* STACK *\n");
printf("*********\n\n");
while(1)
{
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
STACK.dsp
# Microsoft Developer Studio Project File - Name="STACK" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=STACK - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "STACK.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "STACK.mak" CFG="STACK - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "STACK - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "STACK - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
// *********
// * STACK *
// *********
//배열로 저장공간을 잡고 top이라는 포인터로 입력 받아서 array[]에 직접 저장하는 방식으로 구현
#include
#include
void Input(); //데이타 입력
void Delete(); //데이타 삭제
void Exit(); //종료 하는 함수
void Exception(); //1,2,9번을 제외한 나머지 번호를 입력했을때 호출하는 함수
void Print(); //출력함수
int array[10]; //스택 저장 공간
int *top,*base,*limit;
//top은 배열에 주소를 가르킨다. 입력할때는 주소를 증가시켜서 입력받고,
//삭제시 주소를 감소시켜 입력받는다.
//base는 배열의 가장 밑의 주소(고정)
//limit는 배열의 가장 위의 주소(고정)
void main()
{
limit=&array[9];
base=&array[0];
top=base-1; //top은 base가 가지는 배열의 가장 밑의 주소값보다 하나(4byte)아래
int num;
printf("*********\n");
printf("* STACK *\n");
printf("*********\n\n");
while(1)
{
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
STACK.dsp
# Microsoft Developer Studio Project File - Name="STACK" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=STACK - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "STACK.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "STACK.mak" CFG="STACK - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "STACK - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "STACK - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
소개글