You are on page 1of 5

#includefstream.

h
#includeconio.h
#includeprocess.h
#includestdio.h
#includestring.h
Void goto6y(int x,int y);
Int x=6, y=8;
class crime
{
Int id;
char name[30];
char cell[30];
formation.
char sentence[20];
char place[20];
char section[30];
char crime[20];
public:
void accept();
void display();
int returnid();
void changedata();
void changedata1();
char* returncity();
char* returncell();
char* returncrime();
};
Void crime::accept()
{
Cout<<\nEnter id number: ;
cin>>id;
cout<<\nental criminals name: ;
gets(name);
cout<<\nenter crime: ;
gets(crime);
cout<<\nenter cell name: ;
gets(cell);
cout<<\nenter place of crime: ;

//class

//declaration of functions.

//accepting data (

gets(place);
cout<<\nenter section: ;
gets(section);
cout<<\\nenter sentence of criminal: ;
gets(sentence);
};
void crime:display()
{
gotox y(2,x);
cout<<id number;
gotoxy(2,y);
cout<<id;
gotoxy(15,x);
cout<<name ;
gotoxy(15,y);
puts (name);
gotoxy(25,x);
cout<<crime;
gotoxy(25,y);
puts (crime);
gotoxy(33,x);
cout<<cell;
gotoxy(33,y);
puts (cell);
gotoxy(42,x);
cout<<place;
gotoxy(42,y);
puts(place);
gotoxy(50,x);
cout<<section;
gotoxy(50,y);
puts(section);
gotoxy(62,x);
cout<<sentence;
gotoxy(62,y);
puts(sentence);
y++;

//displaying data(

};
int crime::returned()
{
return id;
};
void crime ::changedata()
{
cout<<\nenter the new sentence\t;
gets(sentence);
};

//change data func

void crime::changedata1()
{
cout<<\nenter the new cell the criminal is shifted to\t;
gets(cell);
};
char * crime::returncity()
{
return place;
};
char* crime::returncrime()
{
return crime;
};
char*crime::returncell()
{

return cell;
};
void main()
{
clrscr();
ofstream fout;
ifstream fin;
fstream f1;

//returning class members..

//main function.(

int num,flag,start,cid,k,n,pos;
char ch[20],ch1[10],city[20],cell[20],crime1[20],cha;
crime c [50],temp;
for(int i=3;i>0;i --)
{
clrscr();
cout<<\t\t.WELCOME TO CRIMINAL BUREAU OF
INVESTIGATION..\n\n\n\n;
If(i<3)
cout<<\n\nenter again , you have <<i<< chances left \n\n;
cout<<enter user name : ;
gets (ch);
cout<<\n\nenter password : ;
gets(ch1);
if(strcmp(ch1,*******)= =0)
//home page
{
flag=1;
break;
}
}
start:
if(flag==1)

You might also like