Vous êtes sur la page 1sur 23

#include<fstream.

h>
#include<conio.h>
#include<stdlib.h>
#include<stdio.h>
#include<string.h>
#include<ctype.h>
#include<dos.h>
#include<graphics.h>
class railway
{
char tno[25];
char tname[50];
char from[50];
char to[50];
char gauge[10];
int len;
int AC_I;
int AC_II;
int AC_III;
int general;
int sleeper;
int a1,a2,a3,a4,a5;
public:
void add();
void modify();
void display();
void RC_menu();
void reserve();
void cancel();
int cal1(int,int,int);
}l;
void mainscreen()
{
clrscr();
textbackground(BLUE+BLINK);
textmode(C4350);
gotoxy(34,10);
cout<<"COMPLETE PROJECT ON";
gotoxy(35,15);
cout<<"RAILWAY MANAGMENT";
gotoxy(20,16);
for(int i=30;i<=55;i++)
{
gotoxy(i,19);
cout<<"";
gotoxy(i,32);
cout<<"";
}
for(i=3;i<12;i++)
{
gotoxy(i,20);
cout<<"
:

";
gotoxy(i,20);
delay(100);

DEVELOPED BY

cout<<" ";
}
int x=35;
char s1[]="SHIVAM SARPAL";
char s2[]="
";
char s3[]="
gotoxy(x,26);
for(int j=0;j<14;j++)
{
cout<<s1[j];
delay(150);
}
gotoxy(x+5,28);
for(j=0;j<4;j++)
{
cout<<s2[j];
delay(150);
}
gotoxy(x-1,30);
for(j=0;j<16;j++)
{
cout<<s3[j];
delay(100);
}
clrscr();
textmode(C80);

";

}
void railway::add()
{
clrscr();
textbackground(BLUE+BLINK);
char entry;
char *p;
fstream fil1;
fil1.open("rail1.dat",ios::app);
int x,y;
fil1.seekg(0,ios::end);
x=fil1.tellg();
y=x/sizeof(railway);
y++;
strcpy(tno,"00");
strcpy(p,itoa(y,p,10));
strcpy(tno,p);
gotoxy(10,3);
cout<<"N E W T R A I N";
gotoxy(10,4);
cout<<"----------------";
gotoxy(10,5);
cout<<"Train code #:";
gotoxy(10,8);
cout<<"Name :";
gotoxy(10,9);
cout<<"From :";
gotoxy(10,10);
cout<<"To :";
gotoxy(10,11);
cout<<"Length of Route<kms> :";
gotoxy(10,12);

cout<<"Gauge<Metre or Broad> :";


gotoxy(10,14);
cout<<"No. of Seats ";
gotoxy(10,16);
cout<<"A.C. I class
:";
gotoxy(10,17);
cout<<"A.C. II class :";
gotoxy(10,18);
cout<<"A.C. III class :";
gotoxy(10,19);
cout<<"Sleeper class :";
gotoxy(10,20);
cout<<"General class :";
gotoxy(24,5);
gets(tno);
gotoxy(17,8);
gets(tname);
gotoxy(17,9);
gets(from);
gotoxy(17,10);
gets(to);
gotoxy(33,11);
cin>>len;
gotoxy(34,12);
gets(gauge);
gotoxy(29,16);
cin>>AC_I;
gotoxy(29,17);
cin>>AC_II;
gotoxy(29,18);
cin>>AC_III;
gotoxy(29,19);
cin>>sleeper;
gotoxy(29,20);
cin>>general;
a1=AC_I;
a2=AC_II;
a3=AC_III;
a4=sleeper;
a5=general;
gotoxy(50,10);
char str[26]="R E G E S T E R I N G....";
for(int i=0;i<26;i++)
{
cout<<str[i];
delay(100);
}
fil1.write((char *)&l,sizeof(l));
fil1.close();
}
void railway::modify()
{
char ccode[50];
int modchoice;
fstream fil2;
fil2.open("rail1.dat",ios::in | ios::ou
t);
gotoxy(14,22);

textbackground(BLUE+BLINK);
cout<<"Enter the Code number of Train t
o be modified :";
cin>>ccode;
fil2.read((char*)&l,sizeof(l));
while(!fil2.eof())
{
if(strcmp(ccode,l.tno)==0)
{
do
{
clrscr();
gotoxy(21,3);
cout<<"M O D I
F Y M E N U FOR T R A I N S";
gotoxy(21,4);
cout<<"-_-_-_-_
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_";
gotoxy(21,6);
cout<<"
CHA
NGE

PRESS";
gotoxy(21,8);
cout<<"Name of

the TRAIN

1 ";
gotoxy(21,9);
cout<<"Staring

PLACE

2 ";
gotoxy(21.15,10

);
cout<<"Ending P
LACE

3 ";
gotoxy(21,11);
cout<<"Length o

f the Route

4 ";
gotoxy(21,12);
cout<<"Gauge of

the TRAIN

5 ";
gotoxy(21,13);
cout<<"--------

---------------------------";
gotoxy(21,15);
cout<<"RETURN T
O MAIN MENU

6 ";
gotoxy(21,18);
cout<<"WHAT IS

YOUR CHOICE...";
cin>>modchoice;
switch(modchoic
e)
{
case 1:
int n=fil2.tellg();
clrscr();
gotoxy(25,6);
cout<<"Enter New Name for the TRAIN

:";

gets(tname);
fil2.seekg(n-sizeof(l));
fil2.write((char*)&l,sizeof(l));
fil2.flush();
break;
case 2:
n=fil2.tellg();
clrscr();
gotoxy(25,6);
cout<<"Enter new starting station :";
gets(from);
fil2.seekg(n-sizeof(l));
fil2.write((char*)&l,sizeof(l));
fil2.flush();
break;
case 3:
n=fil2.tellg();
clrscr();
gotoxy(25,6);
cout<<"Enter new Ending point :";
gets(to);
fil2.seekg(n-sizeof(l));
fil2.write((char*)&l,sizeof(l));
fil2.flush();
break;
case 4:
n=fil2.tellg();
clrscr();
gotoxy(25,6);
cout<<"Enter new LENGTH of route :";

cin>>len;
fil2.seekg(n-sizeof(l));
fil2.write((char*)&l,sizeof(l));
fil2.flush();
break;
case 5:
n=fil2.tellg();
clrscr();
gotoxy(25,6);
cout<<"Enter new Gauge of the Train(Metre or Broad) :";
gets(gauge);
fil2.seekg(n-sizeof(l));
fil2.write((char*)&l,sizeof(l));
fil2.flush();
break;
case 6:
clrscr();
gotoxy(23,7);
cout<<" YOU ENDED THIS SESSION FOR MODIFY ";
gotoxy(23,8);
delay(1000);
break;
}// e
nd of switch case
} // end of do-w
hile
while(modchoice!
=6);
} // end of if statemen
t
fil2.read((char*)&l,sizeof(l)
);
} // end of while loop
} // end of function
void railway::reserve()
{

char *bcode;
fstream fil3;
fil3.open("rail1.dat",ios::in | ios::out);
cout<<"Enter the CODE no. of the train";
cin>>bcode;
fil3.seekg(0,ios::beg);
fil3.read((char*)&l,sizeof(l));
while(fil3)
{
if(strcmp(bcode,l.tno)==0)
{
int n=fil3.tellg();
if(l.AC_I==0 && l.AC_II==0 && l.AC_III==0 && l.
sleeper==0 && l.general==0)
{
clrscr();
gotoxy(25,5);
cout<<"No ticket of this train is available.";
getch();
break;
}
else
{
int ch,num;
gotoxy(4,5);
cout<<"-RESERVATION FOR WHICH CLASS-";
gotoxy(5,7);
cout<<" AC 1st class
<1>";
gotoxy(5,8);
cout<<" AC 2nd class
<2>"
;
gotoxy(5,9);
cout<<" AC 3rd class
<3>"
;
gotoxy(5,10);
cout<<" Sleeper class
<4>";
gotoxy(5,11);
cout<<" General class
<5>";
gotoxy(5,13);
cout<<"ENTER YOUR CHOICE";
cin>>ch;
gotoxy(5,14);
cout<<" How many Tickets";
cin>>num;
switch(ch)
{
case 1:
if(num>AC_I)
{
gotoxy(5,16);
cout<<"These many ticke
ts are not available";
break;
}
else
{
int a=cal1(ch,num,len);
gotoxy(5,16);
cout<<"You will have to pay"<<a<

<"rupees";
gotoxy(5,18);
cout<<"Press any key when paid
";
getch();
AC_I=AC_I-num;
fil3.seekg(n-sizeof(l));
fil3.write((char*)&l,sizeof(l)
);
break;
}
case 2:
if(num>AC_II)
{
gotoxy(5,16);
cout<<"These many ticke
ts are not available";
break;
}
else
{
int a=cal1(ch,num,len);
gotoxy(5,16);
cout<<"You will have to pay"<<a
<<"rupees";
gotoxy(5,18);
cout<<"Press any key when pai
d";
getch();
AC_II=AC_II-num;
fil3.seekg(n-sizeof(l));
fil3.write((char*)&l,sizeof(l
));
break;
}
case 3:
if(num>AC_III)
{
gotoxy(5,16);
cout<<"These many ticke
ts are not available";
break;
}
else
{
int a=cal1(ch,num,len);
gotoxy(5,16);
cout<<"You will have to pay"<<a
<<"rupees";
gotoxy(5,18);
cout<<"Press any key when pai
d";
getch();
AC_III=AC_III-num;
fil3.seekg(n-sizeof(l));
fil3.write((char*)&l,sizeof(l
));
}
break;
case 4:

if(num>sleeper)
{
gotoxy(5,16);
cout<<"These many ticke
ts are not available";
break;
}
else
{
int a=cal1(ch,num,len);
gotoxy(5,16);
cout<<"You will have to pay"<<a
<<"rupees";
gotoxy(5,18);
cout<<"Press any key when pai
d";
getch();
sleeper=sleeper-num;
fil3.seekg(n-sizeof(l));
fil3.write((char*)&l,sizeof(l
));
}
break;
case 5:
if(num>general)
{
gotoxy(5,16);
cout<<"These many ticke
ts are not available";
break;
}
else
{
int a=cal1(ch,num,len);
gotoxy(5,16);
cout<<"You will have to
pay"<<a<<"rupees";
gotoxy(5,18);
cout<<"Press any key whe
n paid";
getch();
general=general-num;
fil3.seekg(n-sizeof(l));
fil3.write((char*)&l,siz
eof(l));
}
break;
default:
gotoxy(25,5);
cout<<"Wrong choice!...";
delay(1000);
break;
}// end of switch "ch"
}// end of else
}//end of if statement
fil3.read((char*)&l,sizeof(l));
}//end of while
}

void railway::cancel()
{
char *bcode;
fstream fil3;
int ch,num;
fil3.open("rail1.dat",ios::in | ios::out);
cout<<"Enter the CODE no. of the train";
cin>>bcode;
fil3.seekg(0,ios::beg);
fil3.read((char*)&l,sizeof(l));
while(fil3)
{
if(strcmp(bcode,l.tno)==0)
{
int n=fil3.tellg();
gotoxy(3,5);
cout<<"-CANCELLATION FOR WHICH CLASS-";
gotoxy(5,7);
cout<<" AC 1st class
<1>";
gotoxy(5,8);
cout<<" AC 2nd class
<2>"
;
gotoxy(5,9);
cout<<" AC 3rd class

<3>"

;
gotoxy(5,10);
cout<<" Sleeper class
gotoxy(5,11);
cout<<" General class

<4>";

<5>";
gotoxy(5,13);
cout<<"ENTER YOUR CHOICE";
cin>>ch;
gotoxy(5,14);
cout<<" How many Tickets";
cin>>num;
int a=cal1(ch,num,len);
gotoxy(5,16);
cout<<"You will be refunded"<<a<<"rupees";
gotoxy(5,18);
cout<<"Press any key when refunded";
getch();
switch(ch)
{
case 1:
if(num>AC_I)
{
gotoxy(5,16);
cout<<"These many ticke
ts cannot be cancelled";
break;
}
else
{
if(l.a1>l.AC_I)
{
int a=cal1(ch,num,len
);
gotoxy(5,16);

cout<<"You will have


to refunded"<<a<<"rupees";
gotoxy(5,18);
cout<<"Press any key
when refunded";
getch();
AC_I=AC_I+num;
fil3.seekg(n-sizeof(l
));
fil3.write((char*)&l,
sizeof(l));
break;
}
else
{
clrscr();
gotoxy(25,5);
cout<<"The Tick
et cannot be returned";
gotoxy(25,7);
getch();
}
}
break;
case 2:
if(num>AC_II)
{
gotoxy(5,16);
cout<<"These many ticke
ts cannot be cancelled";
break;
}
else
{
if(l.a1>l.AC_II)
{
int a=cal1(ch,num,len
);
gotoxy(5,16);
cout<<"You will have
to refunded"<<a<<"rupees";
gotoxy(5,18);
cout<<"Press any key
when refunded";
getch();
AC_II=AC_II+num;
fil3.seekg(n-sizeof(l
));
fil3.write((char*)&l,
sizeof(l));
break;
}
else
{
clrscr();
gotoxy(25,5);
cout<<"The Tick
et cannot be returned";
gotoxy(25,7);
getch();

}
}
break;
case 3:
if(num>AC_III)
{
gotoxy(5,16);
cout<<"These many ticke
ts cannot be cancelled";
break;
}
else
{
if(l.a1>l.AC_III)
{
int a=cal1(ch,num,len
);
gotoxy(5,16);
cout<<"You will have
to refunded"<<a<<"rupees";
gotoxy(5,18);
cout<<"Press any key
when refunded";
getch();
AC_III=AC_III+num;
fil3.seekg(n-sizeof(l
));
fil3.write((char*)&l,
sizeof(l));
break;
}
else
{
clrscr();
gotoxy(25,5);
cout<<"The Tick
et cannot be returned";
gotoxy(25,7);
getch();
}
}
break;
case 4:
if(num>sleeper)
{
gotoxy(5,16);
cout<<"These many ticke
ts cannot be cancelled";
break;
}
else
{
if(l.a1>l.sleeper)
{
int a=cal1(ch,num,len
);
gotoxy(5,16);
cout<<"You will have
to refunded"<<a<<"rupees";
gotoxy(5,18);

cout<<"Press any key


when refunded";
getch();
sleeper=sleeper+num;
fil3.seekg(n-sizeof(l
));
fil3.write((char*)&l,
sizeof(l));
break;
}
else
{
clrscr();
gotoxy(25,5);
cout<<"The Tick
et cannot be returned";
gotoxy(25,7);
getch();
}
}
break;
case 5:
if(num>general)
{
gotoxy(5,16);
cout<<"These many ticke
ts cannot be cancelled";
break;
}
else
{
if(l.a1>l.general)
{
int a=cal1(ch,num,len
);
gotoxy(5,16);
cout<<"You will have
to refunded"<<a<<"rupees";
gotoxy(5,18);
cout<<"Press any key
when refunded";
getch();
general=general+num;
fil3.seekg(n-sizeof(l
));
fil3.write((char*)&l,
sizeof(l));
break;
}
else
{
clrscr();
gotoxy(25,5);
cout<<"The Tick
et cannot be returned";
gotoxy(25,7);
getch();
}
}
break;

}//end of switch case"ch"


}//end of if
fil3.read((char*)&l,sizeof(l));
}//end of while
}
int railway::cal1(int p,int n,int a)
{
int z1=1,z=1;
if(a>1&&a<100)
{
if(p==1)
{
z1=542*n;
z=(z1*a)+35;
}
else if(p==2)
{
z1=322*n;
z=(z1*a)+25;
}
else if(p==3)
{
z1=158*n;
z=(z1*a)+25;
}
else if(p==4)
{
z1=26*n;
z=(z1*a)+20;
}
else if(p==5)
{
z1=16*n;
z=(z1*a)+15;
}
}
else if(a>100&&a<=250)
{
if(p==1)
{
z1=948*n;
z=(z1*a)+(35*n);
}
else if(p==2)
{
z1=489*n;
z=(z1*a)+(25*n
);
}
else if(p==3)
{
z1=305*n;
z=(z1*a)+(25*n
);
}
else if(p==4)
{
z1=109*n;

z=(z1*a)+(20*n
);
}
else if(p==5)
{
z1=68*n;
z=(z1*a)+(15*n
);
}
}
else if(a>250&&a<=400)
{
if(p==1)
{
z1=1347*n;
z=(z1*a)+(35*n);
}
else if(p==2)
{
z1=693*n;
z=(z1*a)+(25*n
);
}
else if(p==3)
{
z1=433*n;
z=(z1*a)+(25*n
);
}
else if(p==4)
{
z1=154*n;
z=(z1*a)+(20*n
);
}
else if(p==5)
{
z1=97*n;
z=(z1*a)+(15*n
);
}
}
else if(a>400&&a<=800)
{
if(p==1)
{
z1=2264*n;
z=(z1*a)+(35*n);
}
else if(p==2)
{
z1=1165*n;
z=(z1*a)+(25*n
);
}
else if(p==3)
{
z1=728*n;
z=(z1*a)+(25*n
);

}
else if(p==4)
{
z1=259*n;
z=(z1*a)+(20*n
);
}
else if(p==5)
{
z1=162*n;
z=(z1*a)+(15*n
);
}
}
else if(a>800&&a<=1600)
{
if(p==1)
{
z1=3468*n;
z=(z1*a)+(35*n);
}
else if(p==2)
{
z1=1784*n;
z=(z1*a)+(25*n
);
}
else if(p==3)
{
z1=1115*n;
z=(z1*a)+(25*n
);
}
else if(p==4)
{
z1=397*n;
z=(z1*a)+(20*n
);
}
else if(p==5)
{
z1=248*n;
z=(z1*a)+(15*n
);
}
}
else if(a>1600&&a<=2200)
{
if(p==1)
{
z1=4168*n;
z=(z1*a)+(35*n);
}
else if(p==2)
{
z1=2144*n;
z=(z1*a)+(25*n
);
}
else if(p==3)

{
z1=1340*n;
z=(z1*a)+(25*n
);
}
else if(p==4)
{
z1=477*n;
z=(z1*a)+(20*n
);
}
else if(p==5)
{
z1=298*n;
z=(z1*a)+(15*n
);
}
}
else if(a>2200&&a<=4200)
{
if(p==1)
{
z1=6431*n;
z=(z1*a)+(35*n);
}
else if(p==2)
{
z1=2949*n;
z=(z1*a)+(25*n
);
}
else if(p==3)
{
z1=1795*n;
z=(z1*a)+(25*n
);
}
else if(p==4)
{
z1=637*n;
z=(z1*a)+(20*n
);
}
else if(p==5)
{
z1=398*n;
z=(z1*a)+(15*n
);
}
}
else if(a>4200)
{
if(p==1)
{
z1=7421*n;
z=(z1*a)+(35*n);
}
else if(p==2)
{

z1=3341*n;
z=(z1*a)+(25*n
);
}
else if(p==3)
{
z1=2061*n;
z=(z1*a)+(25*n
);
}
else if(p==4)
{
z1=701*n;
z=(z1*a)+(20*n
);
}
else if(p==5)
{
z1=438*n;
z=(z1*a)+(15*n
);
}
}
else if(a==0)
z=0;
return(z);
}

void railway::RC_menu()
{
textbackground(BLUE+BLINK);
int entry;
clrscr();
gotoxy(22,8);
cout<<"RESERVATION / CANCELLATION";
gotoxy(22,9);
cout<<"-------------";
gotoxy(22,10);
cout<<"1. Reserve a Ticket. ";
gotoxy(22,12);
cout<<"2. Cancel a Ticket. ";
gotoxy(22,15);
cout<<"Enter your choice..";
cin>>entry;
switch(entry)
{
case 1:
clrscr()
;
reserve(
);
break;
case 2:
clrscr()
;
cancel()
;
break;

default:
cout<<"
INVALID CHOICE!!!";
break;
}//end of switch case"en
try"
}//end of function
void main()
{
clrscr();
highvideo();
textmode(C4350);
textbackground(BLUE+BLINK);
mainscreen();
clrscr();
textbackground(BLUE+BLINK);
char ch1;
clrscr();
for(int i=1;i<=80;i++)
{
gotoxy(i,1);
cout<<"";
gotoxy(i,24);
cout<<"";
}
for(i=1;i<=24;i++)
{
gotoxy(1,i);
cout<<"";
gotoxy(80,i);
cout<<"";
}
int ctr=0;
char *word="R A I L W A Y R E S E R V A T I O N";
int l1;
l1=strlen(word);
int f=0;
while(f<=l1)
{
char ch;
ch=word[f];
int c=75;
while(c>=22+ctr)
{
gotoxy(c,5);
gotoxy(c-1,5);
cout<<ch;
c=c-1;
delay(5);
}
f=f+1;
ctr=ctr+1;
}
delay(20);
do
{
clrscr();
for(int i=1;i<=80;i++)

{
gotoxy(i,1);
cout<<"";
gotoxy(i,24);
cout<<"";
}
for(i=1;i<=24;i++)
{
gotoxy(1,i);
cout<<"";
gotoxy(80,i);
cout<<"";
}
textcolor(15);
gotoxy(18,5);
cout<<"
R A I L W A Y R E S E R V A T I O N ";
textcolor(8);
gotoxy(18,6);
cout<<" ";
gotoxy(18,4);
cout<<" ";
textcolor(7);
gotoxy(25,8);
cout<<"Add a new Train
....A";
gotoxy(25,10);
cout<<"Display Existing Trains
....D";
gotoxy(25,12);
cout<<"Reservation / Cancellation
....R";
gotoxy(25,14);
cout<<"Modify Existing
....M";
gotoxy(25,16);
cout<<"Exit
....E";
gotoxy(25,20);
cout<<"Enter your choice
.... ";
ch1=getche();
ch1=toupper(ch1);
switch(ch1)
{
case 'A':
l.add();
break;
case 'D':
l.display();
break;
case 'R':
case 'C':
l.RC_menu();
break;
case 'M':
l.modify();
break;
case 'E':
break;
}
}
while(ch1!='E');
}

void railway::display()
{
fstream file;
int dchoice;
file.open("rail1.dat",ios::in | ios::out);
file.seekg(0,ios::beg);
clrscr();
gotoxy(25,6);
cout<<"Display according to code entered... <1>";
gotoxy(25,8);
cout<<"Display all records in tabular form... <2>";
gotoxy(25,12);
cout<<"Enter your choice #";
cin>>dchoice;
switch(dchoice)
{
case 1:
char *rec;
clrscr();
gotoxy(5,6);
cout<<"ENTER TRAIN NUMBER TO BE DISPLAYED #";
gets(rec);
file.read((char *)&l,sizeof(l));
while(file.eof())
{
clrscr();
gotoxy(25,10);
cout<<"No record has been added yet.";
gotoxy(25,11);
cout<<"Run option 'A' first of all.";
getch();
break;
}
if(strcmp(tno,rec)==0)
{
clrscr();
gotoxy(30,3);
cout<<tname;
gotoxy(10,7);
cout<<"Train Code #"<<tno;
gotoxy(10,9);
"<<from;
cout<<"From
gotoxy(10,11);
cout<<"To
"<<to;
gotoxy(10,13);
cout<<"Gauge
"<<gauge;
gotoxy(10,15);
cout<<"Length of Route
"<<len<<"kms";
gotoxy(55,5);
cout<<"- NO. OF SEATS -";
gotoxy(55,7);
cout<<"A.C. Ist class
:>"<<AC_I;
gotoxy(55,9);
cout<<"A.C. II Tier
:>"<<AC_II;
gotoxy(55,11);
cout<<"A.C. III Tier
:>"<<AC_III;
gotoxy(55,13);
cout<<"SLEEPER III Tier :>"<<sleeper;
gotoxy(55,15);
cout<<"GENERAL
:>"<<general;

gotoxy(25,23);
cout<<"PRESS ANY KEY TO CONTINUE....";
getch();
}
file.read((char *)&l,sizeof(l));
file.close();
break;
case 2:
clrscr();
int row=3;
int flag=0;
char ch;
gotoxy(1,1);
textcolor(11);
cout<<" Name
From
To
Code";
gotoxy(1,2);
cout<<"-----------------------------------------------------------------------------";
textcolor(15);
while(file.read((char*)&l,sizeof(l)))
{
_setcursortype(_NOCURSOR);
flag=0;
delay(100);
gotoxy(2,row);
cout<<tname;
gotoxy(30,row);
cout<<from;
gotoxy(53,row);
cout<<to;
gotoxy(75,row);
cout<<tno;
if(row==23)
{
flag=1;
row=3;
textcolor(11);
gotoxy(17,25);
cout<<"PRESS ANY KEY TO CONTINUE OR PRESS <ESC> TO EXIT";
textcolor(7);
ch=getch();
if (ch==27)
break;
clrscr();
textcolor(10);
gotoxy(1,2);
cprintf("NAME
FROM");
gotoxy(1,2);
cprintf("------------------------------------------------");
textcolor(7);
}
else
row+=2;
}
if(!flag)
{
textcolor(15);
gotoxy(20,25);
cout<<"PRESS ANY TO GO BACK TO MAIN MENU";

getche();
textcolor(7);
}
file.close();
break;
}
}

Vous aimerez peut-être aussi