// file name : ele10.cpp
#include\"stdafx.h\"
#include\"ele.h\"
#ifndef CONIO
#define CONIO
#include<conio.h>
#endif
#ifndef STDIO
#define STDIO
#include<stdio.h>
#endif
Container1::Container1(int max, int floor = 1):
Container(max, floor)
{
dContainer();
}
void Container1::dContainer()
{
int x,y;
x = 32;
y = -2 * GetFloor() + 19;
if( GetContainerState() == MovingUp )
y--;
if( GetContainerState() == MovingDown )
y++;
gotoxy(x,y-2);
printf(\" \");
gotoxy(x, y - 1);
printf(\" \");
gotoxy(x, y + 3);
printf(\" \");
gotoxy(x, y + 4);
printf(\" \");
switch ( GetDoorState() )
{
case Opened:
gotoxy(x, y);
printf(\"%c%c%c\",214,205,184);
gotoxy(x, y+1);
printf(\"%c%c%c\",186,\' \',186);
gotoxy(x, y+2);
printf(\"%c%c%c\",211,205,189);
break;
case Opening:
case Closing:
gotoxy(x, y);
printf(\"%c%c%c\",218,210,191);
gotoxy(x, y+1);
printf(\"%c%c%c\",179,186,179);
gotoxy(x, y+2);
printf(\"%c%c%c\",192,208,217);
break;
case Closed:
gotoxy(x, y);
printf(\"%c%c%c\",218,196,191);
gotoxy(x, y+1);
printf(\"%c%c%c\",179,\' \',179);
gotoxy(x, y+2);
printf(\"%c%c%c\",192,196,217);
break;
}
}
void Container1::dDoor()
{
dContainer();
}
void Container1::dButton()
{
int i;
for( i = 1; i <= 7; i++ )
{
gotoxy(12, i+6);
if( GetButton(i) != 0 )
printf(\"%c\", 2);
else
printf(\" \");
}
gotoxy(16,10);
printf(\"in Elevator\");
gotoxy(18, 11);
printf(\"%d person(s)\", GetNumber());
}
Container2::Container2(int max, int floor = 7):
Container(max, floor)
{
dContainer();
}
void Container2::dContainer()
{
int x,y;
x = 45;
y = -2 * GetFloor() + 19;
if( GetContainerState() == MovingUp )
y--;
if( GetContainerState() == MovingDown )
y++;
gotoxy(x, y - 2);
printf(\" \");
gotoxy(x, y - 1);
printf(\" \");
gotoxy(x, y + 3);
printf(\" \");
gotoxy(x, y + 4);
printf(\" \");
switch ( GetDoorState() )
{
case Opened:
gotoxy(x, y);
printf(\"%c%c%c\",214,205,184);
gotoxy(x, y+1);
printf(\"%c%c%c\",186,\' \',186);
gotoxy(x, y+2);
printf(\"%c%c%c\",211,205,189);
break;
case Opening:
case Closing:
gotoxy(x, y);
printf(\"%c%c%c\",218,210,191);
gotoxy(x, y+1);
printf(\"%c%c%c\",179,186,179);
gotoxy(x, y+2);
printf(\"%c%c%c\",192,208,217);
break;
case Closed:
gotoxy(x, y);
printf(\"%c%c%c\",218,196,191);
gotoxy(x, y+1);
printf(\"%c%c%c\",179,\' \',179);
gotoxy(x, y+2);
printf(\"%c%c%c\",192,196,217);
break;
}
}
void Container2::dDoor()
{
dContainer();
}
void Container2::dButton()
{
int i;
for( i = 1; i <= 7; i++ )
{
gotoxy(69, i+6);
if( GetButton(i) != 0 )
printf(\"%c\", 2);
else
printf(\" \");
}
gotoxy( 51, 10);
printf(\"in Elevator\");
gotoxy( 53, 11);
printf(\"%d person(s)\", GetNumber());
}
////////////////
ㅠㅠ울고있습니다
아까 말했지만 에러메세지좀..
씹살롱아
개자지같은 질문 올리지 말고, 꺼져.
\"stdafx.h\" 와 \"ele.h\" 도 올려주셈요
ura님 이거 압축해서 메일이나 어디로 보내드리면안될까요..ㅠㅠ너무 길어서 다른분들께 죄송할듯..합니다...
씹살롱 꺼지라니까 어디서 댓글질이야?
헤더파일도 같이 올려주셔야지 알아보든가 하지
firea32@gmail.com 보내봐요. 회사 업무가 안되니까 잉여짓이 잘되네
헤더파일이 워낙많아서...ㅠㅠ죄송합니다. 댓글감사합니다!