//this is not able to retrieve the form i.e modify in enquiry. pls help

+2 jenson francis · November 27, 2015
//this is not able to retrieve the form i.e modify in enquiry. pls help
#include<iostream>
#include<conio.h>
#include<stdio.h>
#include<iomanip>
#include<fstream>
#include<ctype.h>
#include<string.h>
#include<process.h>
#include<windows.h>

using namespace std;

class nda{
char name[20];
char gender[7];
double dob;
char mname[20];
char fname[20];
char nation[20];
char comm[20];
char add[80];
char email[20];
double mobileno;
public:
int education;
void input();
void output();
void startup();
void about();
void elg();
void procedure();
void edi();
void edc();
int getdob()
{
return (dob);
}
};



void gotoxy(int x,int y) 
{
COORD pos = {x, y};
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos);
}

class cds {

char name[20];
char gender[7];
long dob;
char mname[20];
char fname[20];
char nation[20];
char comm[20];
char add[80];
char email[20];
long mobileno;
public:
int education;
void input();
void output();
void startup();
void about();
void elg();
void procedure();
void edi();
void edc();
int getdob()
{
return (dob);
}
};
class ips{
char name[20];
char gender[7];
long dob;
char mname[20];
char fname[20];
char nation[20];
char comm[20];
char add[80];
char email[20];
long mobileno;
public:
int education;
void input();
void output();
void startup();
void about();
void elg();
void procedure();
void edi();
void edc();
int getdob()
{
return (dob);
}
};



class help
{
public:
void enter();
void search();
void contact();
void exam();
void enquiry();
};

void nda::input()
{ nda x;
system("cls");
     fstream f1;
     f1.read("nda.dat",ios::out);
     {
     gotoxy(25,1);cout<<"APPLICATION FORM \n";
     gotoxy(15,3);cout<<"Name : ";
     gotoxy(45,3);cout<<"Gender : ";
     gotoxy(15,5);cout<<"Date of Birth : ";
     gotoxy(45,5);cout<<"Father's name : ";
     gotoxy(15,7);cout<<"Mother's name : ";
     gotoxy(45,7);cout<<"Nationality : ";
     gotoxy(15,9);cout<<"Community : ";
     gotoxy(15,11);cout<<"Address : ";
     gotoxy(45,9);cout<<"Email : ";
     gotoxy(15,13);cout<<"Mobile No. : ";
     gotoxy(21,3);gets(name);
     gotoxy(53,3);gets(gender);
     gotoxy(30,5);cin>>dob;
     gotoxy(60,5);gets(fname);
     gotoxy(30,7);gets(mname);
     gotoxy(58,7);gets(nation);
     gotoxy(26,9);gets(comm);
     gotoxy(52,9);gets(email);
     gotoxy(24,11);gets(add);
     gotoxy(27,13);cin>>mobileno;}
     f1.write((char*)&x,sizeof(x));
     f1.close();}
     void nda::output(){int i;
     nda x;
     system("cls");
     fstream f1;
     f1.open("nda.dat",ios::in);
     f1.read((char*)&x,sizeof(x));
     while(!f1.eof())
     {
f1.read((char*)&x,sizeof(x));
}
     gotoxy(15,3);cout<<"Name : "<<name;
     gotoxy(45,3);cout<<"Gender : "<<gender;
     gotoxy(15,5);cout<<"Date of Birth : "<<dob;
     gotoxy(45,5);cout<<"Father's name : "<<fname;
     gotoxy(15,7);cout<<"Mother's name : "<<mname;
     gotoxy(45,7);cout<<"Nationality : "<<nation;
     gotoxy(15,9);cout<<"Community : "<<comm;
     gotoxy(15,11);cout<<"Address : "<<add;
     gotoxy(45,9);cout<<"Email : "<<email;
     gotoxy(15,13);cout<<"Mobile No. : "<<mobileno;
f1.close();
}
void rid(){
gotoxy(30,1);
cout<<"Registration Id no :11";   }
void nda::edi(){
int y;
gotoxy(15,15);cout<<"Educational Qualifications : ";
     gotoxy(15,17);cout<<"1.Passed class 12 without physics and maths";
     gotoxy(15,18);cout<<"2.Appearing in class 12 without physics and maths";
     gotoxy(15,19);cout<<"3.Passed class 12 with physics and maths";
     gotoxy(15,20);cout<<"4.Appearing in class 12 with physics and maths";
     gotoxy(15,22);cout<<"Enter (1,2,3 or 4) : ";
     gotoxy(25,25);cout<<"press any key to continue ";
     gotoxy(35,22);cin>>education;
     gotoxy(50,25);cin>>y;
      }
     void nda::edc(){     gotoxy(15,15);cout<<"Educational Qualifications : \n";
     if(education==1)
     {gotoxy(15,17);cout<<"Passed class 12 without physics and maths";}
     if(education==2)
     {gotoxy(15,17);cout<<"Appearing in class 12 without physics and maths";}
     if(education==3)
     {gotoxy(15,17);cout<<"Passed class 12 with physics and maths";}
     if(education==4)
     {gotoxy(15,17);cout<<"Appearing in class 12 with physics and maths";}
     gotoxy(25,20);cout<<" Application form successfully filled ";
     gotoxy(15,23);cout<<"Note:Pay the application fee (100)Rupee cash in your nearest state ";
     gotoxy(15,24);cout<<"bank of india branch by challan without it your form is incomplete \n";  }





void upsc()
{system("cls");
int r,p;
gotoxy(17,1);cout<<"       UNION PUBLIC SERVICE COMMISION \n";
gotoxy(17,3); cout<<" ! !   ! !  ! !!!!! !  ! !!!!!!!  ! !!!!!! \n " ;
gotoxy(17,4); cout<<" ! !   ! !  ! !   ! !  ! !        ! !        \n" ;
gotoxy(17,5); cout<<" ! !   ! !  ! !!!!! !  ! !!!!! !  ! !        \n " ;
gotoxy(17,6); cout<<" ! !   ! !  ! !              ! !  ! !        \n " ;
gotoxy(17,7); cout<<" ! !!!!! !  ! !        !!!!!!! !  ! !!!!!!      \n " ;
gotoxy(19,10);cout<<"          WELCOME!!!!!.....  \n ";
gotoxy(20,12);cout<<" 1. National Defence Academy(NDA) \n";
gotoxy(20,14);cout<<" 2. Combined Defence Service(CDS)  \n";
gotoxy(20,16);cout<<" 3. Indian Police Service(IPS)    \n";
gotoxy(20,18);cout<<" 4. Enquiry  \n";
gotoxy(20,20);cout<<" 5. Exit    \n";
gotoxy(20,22);cout<<" Enter your choice(1,2,3,4 or 5)  ";
}
void nda::startup()
{
system("cls");
gotoxy(17,1);cout<<"      NATIONAL DEFENCE ACADEMY \n";
gotoxy(17,3); cout<<" ! !!   ! !  ! !!!!! !  ! !!!!!!!   \n " ;
gotoxy(17,4); cout<<" ! ! !  ! !  ! !   ! !  ! !   ! !          \n" ;
gotoxy(17,5); cout<<" ! !  ! ! !  ! !   ! !  ! !!!!! !        \n " ;
gotoxy(17,6); cout<<" ! !   !! !  ! !   ! !  ! !   ! !         \n " ;
gotoxy(17,7); cout<<" ! !    ! !  ! !!!!! !  ! !   ! !      \n " ;
gotoxy(22,10);cout<<"1.ABOUT NDA \n";
gotoxy(22,12);cout<<"2.ELIGIBILITY \n";
gotoxy(22,14);cout<<"3.PROCEDURE \n";
gotoxy(22,16);cout<<"4.APPLY ONLINE \n";
gotoxy(22,18);cout<<"5.MAIN MENU  \n";
gotoxy(22,20);cout<<"Enter your choice(1,2,3,4 or 5): ";}

void alln()
{
nda x;
int p,r;
x.startup();
cin>>p;
if(p==1)
x.about();
else if(p==2)
x.elg();
if(p==3)
x.procedure();
else
if(p==4)
{ x.input();
x.edi();
x.output();
x.edc();
rid();
}
}

void nda::about()
{ system("cls");
char c;
gotoxy(25,1);
cout<<" NATIONAL DEFENCE ACADEMY \n";
cout<<"The National Defence Academy (NDA) is the Joint Services academy of the Indian Armed Forces, where cadets of the three services, the Army, the Navy and the Air Force train together before they go on to pre-commissioning training in their respective service academies. The NDA is located at Khadakwasla near Pune, Maharashtra. It is the first tri-service academy in the world.";
cout<<"NDA alumni have led and fought in every major conflict in which the Indian Armed Forces has been called to action since the academy was established. The alumni include 3 Param Vir Chakra recipients and 9 Ashoka Chakra recipients. National Defence Academy has produced 27 service Chiefs Of Staff till date. Current Chiefs Of Staff of the Army, the Navy and the Air Force are all NDA alumni.";
gotoxy(25,25);cout<<"press any key to go back ";
cin>>c;
alln();
}
void nda::elg()
{ system("cls");
char c;
gotoxy(25,1);cout<<"ELIGIBILITY \n";
cout<<"(a) Nationality : \n";
cout<<"A candidate must either be : \n";
cout<<"1.a citizen of India, or \n";
cout<<"2.a subject of Bhutan, or \n";
cout<<"3.a subject of Nepal \n";
cout<<"\n";
cout<<"(b) Age Limits, Sex and Marital Status : \n";
cout<<"A candidate must be an unmarried male and have born not earlier than 2nd January1997 and not later than 1st January 2000.";
cout<<"\n";
cout<<"(c) Educational Qualifications : \n";
cout<<"12th Class pass of the 10+2 pattern of School Education or equivalent examination conducted by a State Education Board .";
gotoxy(25,25);cout<<"press any key to go back ";
cin>>c;
alln();
 }

void nda::procedure()
{ system("cls");
char c;
gotoxy(30,1);cout<<"PROCEDURE \n";
cout<<"Applicants to the NDA are selected via a written exam conducted by the UPSC, followed by extensive interviews covering general aptitude, psychological testing, team skills as well as physical and social skills, along with medical tests. Incoming classes are accepted twice a year for semesters starting in July and January. About 320,000 applicants sit for each written exam. Typically, about 9,000 of these are invited to interview. Applicants to join the Air Force also go through a Pilot Aptitude Battery Test. About 300-350 cadets are accepted to the academy each semester. About 66 cadets are accepted for the Air Force, 39 for the Navy and 195 for the Army.";
gotoxy(25,25);cout<<"press any key to go back ";
cin>>c;
alln();
 }
//*****************************CDS*****************************
//**************************************************************


void cds::input()
{
cds x;
system("cls");
     fstream f2;
     f2.open("cds.dat",ios::out);
     {
     gotoxy(25,1);cout<<"APPLICATION FORM \n";
     gotoxy(15,3);cout<<"Name : ";
     gotoxy(45,3);cout<<"Gender : ";
     gotoxy(15,5);cout<<"Date of Birth : ";
     gotoxy(45,5);cout<<"Father's name : ";
     gotoxy(15,7);cout<<"Mother's name : ";
     gotoxy(45,7);cout<<"Nationality : ";
     gotoxy(15,9);cout<<"Community : ";
     gotoxy(15,11);cout<<"Address : ";
     gotoxy(45,9);cout<<"Email : ";
     gotoxy(15,13);cout<<"Mobile No. : ";
     gotoxy(21,3);gets(name);
     gotoxy(53,3);gets(gender);
     gotoxy(30,5);cin>>dob;
     gotoxy(60,5);gets(fname);
     gotoxy(30,7);gets(mname);
     gotoxy(58,7);gets(nation);
     gotoxy(26,9);gets(comm);
     gotoxy(52,9);gets(email);
     gotoxy(24,11);gets(add);
     gotoxy(27,13);cin>>mobileno;
}

     f2.write((char*)&x,sizeof(x));
     f2.close();

   }
     void cds::output(){int i;
     cds x;
     system("cls");
     fstream f2;
     f2.open("cds.dat",ios::in);
     f2.read((char*)&x,sizeof(x));
     while(!f2.eof())
     {f2.read((char*)&x,sizeof(x));}
     gotoxy(15,3);cout<<"Name : "<<name;
     gotoxy(45,3);cout<<"Gender : "<<gender;
     gotoxy(15,5);cout<<"Date of Birth : "<<dob;
     gotoxy(45,5);cout<<"Father's name : "<<fname;
     gotoxy(15,7);cout<<"Mother's name : "<<mname;
     gotoxy(45,7);cout<<"Nationality : "<<nation;
     gotoxy(15,9);cout<<"Community : "<<comm;
     gotoxy(15,11);cout<<"Address : "<<add;
     gotoxy(45,9);cout<<"Email : "<<email;
     gotoxy(15,13);cout<<"Mobile No. : "<<mobileno;
f2.close();}



void cds::edi(){int y;
gotoxy(15,15);cout<<"Educational Qualifications : ";
     gotoxy(15,17);cout<<"1.Appearing for a Degree from a recognized university.";
     gotoxy(15,18);cout<<"2.Having a Bachelor of Engineering degree(B.Tech,B.sc).(Passed)";
     gotoxy(15,19);cout<<"3.Having a Degree from a recognized university.(Passed)";
     gotoxy(15,20);cout<<"4.Appearing for Bachelor of Engineering degree(B.Tech,B.sc).";
     gotoxy(15,22);cout<<"Enter (1,2,3 or 4) : ";
     gotoxy(25,25);cout<<"press any key to continue ";
     gotoxy(35,22);cin>>education;
     gotoxy(50,25);cin>>y;
     }
     void cds::edc(){
     int c;  gotoxy(15,15);cout<<"Educational Qualifications : \n";
     if(education==1)
     {gotoxy(15,17);cout<<"Appearing for a Degree  from a recognized university.";}
     if(education==2)
     {gotoxy(15,17);cout<<"Having a Bachelor of Engineering degree(B.Tech,B.sc).(Passed)";}
     if(education==3)
     {gotoxy(15,17);cout<<"Having a Degree from a recognized university.(Passed)";}
     if(education==4)
     {gotoxy(15,17);cout<<"Appearing for Bachelor of Engineering degree(B.Tech,B.sc).";}
     gotoxy(25,20);cout<<" Application form successfully filled ";
     gotoxy(15,23);cout<<"Note:Pay the application fee (100)Rupee cash in your nearest state ";
     gotoxy(15,24);cout<<"bank of india branch by challan without it your form is incomplete \n";
       }
       void rid1(){

gotoxy(30,1);cout<<"Registration Id no :24";   }
 void cds::startup()
{
system("cls");
gotoxy(17,1);cout<<"  COMBINED DEFENCE SERVICE \n";
gotoxy(17,3); cout<<" ! !!!!!!!   ! !!!!!!!  ! !!!!!!!   \n " ;
gotoxy(17,4); cout<<" ! !         ! !   ! !  ! !            \n" ;
gotoxy(17,5); cout<<" ! !         ! !   ! !  ! !!!!! !        \n " ;
gotoxy(17,6); cout<<" ! !         ! !   ! !        ! !         \n " ;
gotoxy(17,7); cout<<" ! !!!!!!!   ! !!!!! !  !!!!!!! !      \n " ;
gotoxy(22,10);cout<<"1.ABOUT CDS\n";
gotoxy(22,12);cout<<"2.ELIGIBILITY \n";
gotoxy(22,14);cout<<"3.PROCEDURE \n";
gotoxy(22,16);cout<<"4.APPLY ONLINE \n";
gotoxy(22,18);cout<<"5.MAIN MENU    \n";
gotoxy(22,20);cout<<"Enter your choice(1,2,3,4 or 5): ";}
void allc()
{ cds y;
nda x;
int p,r;
y.startup();
cin>>p;
if(p==1)
y.about();
else if(p==2)
  y.elg();
if(p==3)
y.procedure();
else if(p==4)
{
  x.input();
y.edi();
x.output();
y.edc();
rid1();
}
}

void cds::about()
{system("cls");
 char c;
gotoxy(25,1);cout<<"   COMBINED DEFENCE SERVICE \n";
cout<<"The Combined Defence Service Examination is an entrance exam to get into the armed forces as an officer.Applicants can join Indian Military Academy,Indian Naval Academy,Air Force Academy,Officers Training Academy (SSC Course for Men),OfficerTraining Academy (SSC Course for Women). ";
cout<<"To join any of the armed forces as an officer candidate must appear in the cds held twice in an year.Cds is like 2nd chance of Nda.Only graduate people can apply for cds entry  ";
gotoxy(25,25);cout<<"press any key to go back ";
cin>>c;
allc();}
void cds::elg()
{system("cls");
char c;
gotoxy(25,1);cout<<"ELIGIBILITY \n";
cout<<"(a) Nationality : \n";
cout<<"A candidate must either be : \n";
cout<<"1.a citizen of India, or \n";
cout<<"2.a subject of Bhutan, or \n";
cout<<"3.a subject of Nepal \n";
cout<<"\n";
cout<<"(b) Age Limits, Sex and Marital Status : \n";
cout<<"i) For Indian Military Academy (IMA): Unmarried male candidates born not earlierthan 02nd July 1992 and not later than 1st July 1997 only are eligible.";
cout<<"ii) For Indian Naval Academy (INA): Unmarried Male candidates born not earlier than 2nd July 1992 and not later than 01st July 1997 only are eligible.";
cout<<"iii) For Air Force Academy (AFA) - Age: 20 to 24 years as on 01st July 2016 i.e. born not earlier than 02nd July 1992 and not later than 01 July 1996.";
cout<<"iv) For Officers Training Academy (SSC Course for Men): Male candidates (married or unmarried) born not earlier than 02nd July 1991 and not later than 01st July 1997 only are eligible.";
cout<<"v) For Officer Training Academy (SSC Women Non-Technical Course): Unmarried Women.";
cout<<"\n\n";
cout<<"(c) Educational Qualifications : \n";
cout<<"i) For Indian Military Academy/Officers'Training Academy: Degree from a recognized university.";
cout<<"ii) For Indian Naval Academy: Bachelor of Engineering.";
cout<<"iii) For AirForce Academy: Degree of a recognized University with Physics and Mathematics at10+2 level or Bachelor of Engineering.";
gotoxy(25,25);cout<<"press any key to go back ";
cin>>c;
allc();
 }

void cds::procedure()
{system("cls");
char c;
gotoxy(30,1);cout<<"PROCEDURE \n";
cout<<"Applicants to the CDS are selected via a written exam conducted by the UPSC, followed by extensive interviews covering general aptitude, psychological testing, team skills as well as physical and social skills, along with medical tests. Incoming classes are accepted twice a year for semesters starting in July and January.  Applicants to join the Air Force also go through a Pilot Aptitude Battery Test. About 300-350 cadets are accepted to the academy each semester.Candidates in their respective academy undergo One year training before the commision as an officer in the armed forces";
gotoxy(25,25);cout<<"press any key to go back ";
cin>>c;
allc();
 }

 //  *******************************IPS****************
///// ****************************************************





void ips::input(){ips z;
system("cls");
     fstream f3;
     f3.open("ips.dat",ios::out);
     {
     gotoxy(25,1);cout<<"APPLICATION FORM \n";
     gotoxy(15,3);cout<<"Name : ";
     gotoxy(45,3);cout<<"Gender : ";
     gotoxy(15,5);cout<<"Date of Birth : ";
     gotoxy(45,5);cout<<"Father's name : ";
     gotoxy(15,7);cout<<"Mother's name : ";
     gotoxy(45,7);cout<<"Nationality : ";
     gotoxy(15,9);cout<<"Community : ";
     gotoxy(15,11);cout<<"Address : ";
     gotoxy(45,9);cout<<"Email : ";
     gotoxy(15,13);cout<<"Mobile No. : ";
     gotoxy(21,3);gets(name);
     gotoxy(53,3);gets(gender);
     gotoxy(30,5);cin>>dob;
     gotoxy(60,5);gets(fname);
     gotoxy(30,7);gets(mname);
     gotoxy(58,7);gets(nation);
     gotoxy(26,9);gets(comm);
     gotoxy(52,9);gets(email);
     gotoxy(24,11);gets(add);
     gotoxy(27,13);cin>>mobileno;
}

     f3.write((char*)&z,sizeof(z));
     f3.close();

   }


     void ips::output(){int i;
     ips z;
     system("cls");
    fstream f3;
    f3.open("ips.dat",ios::in);
    f3.read((char*)&z,sizeof(z));
    while(!f3.eof())
     {f3.read((char*)&z,sizeof(z));}
     gotoxy(15,3);cout<<"Name : "<<name;
     gotoxy(45,3);cout<<"Gender : "<<gender;
     gotoxy(15,5);cout<<"Date of Birth : "<<dob;
     gotoxy(45,5);cout<<"Father's name : "<<fname;
     gotoxy(15,7);cout<<"Mother's name : "<<mname;
     gotoxy(45,7);cout<<"Nationality : "<<nation;
     gotoxy(15,9);cout<<"Community : "<<comm;
     gotoxy(15,11);cout<<"Address : "<<add;
     gotoxy(45,9);cout<<"Email : "<<email;
     gotoxy(15,13);cout<<"Mobile No. : "<<mobileno;
f3.close();}
void rid2(){
gotoxy(30,1);cout<<"Registration Id no :32";      }

void ips::edi(){int y;
gotoxy(15,15);cout<<"Educational Qualifications : ";
     gotoxy(15,17);cout<<"1.Appearing for a Degree from a recognized university.";
       gotoxy(15,19);cout<<"2.Having a Degree from a recognized university.(Passed)";
 gotoxy(15,22);cout<<"Enter (1, or 2) : ";
     gotoxy(25,25);cout<<"press any key to continue ";
     gotoxy(35,22);cin>>education;
     gotoxy(50,25);cin>>y;
      }



     void ips::edc(){
     int c;  gotoxy(15,15);cout<<"Educational Qualifications : \n";
     if(education==1)
     {gotoxy(15,17);cout<<"Appearing for a Degree  from a recognized university.";}
     if(education==2)
     {gotoxy(15,17);cout<<"Having a Degree from a recognized university.(Passed)";}
      gotoxy(25,20);cout<<" Application form successfully filled ";
     gotoxy(15,23);cout<<"Note:Pay the application fee (100)Rupee cash in your nearest state ";
     gotoxy(15,24);cout<<"bank of india branch by challan without it your form is incomplete \n";
       }



void ips::startup()
{
system("cls");
gotoxy(17,1);cout<<"     INDIAN POLICE SERVICE \n";
gotoxy(17,3); cout<<"    ! !   ! !!!!!!!   ! !!!!!!!   \n " ;
gotoxy(17,4); cout<<"    ! !   ! !   ! !   ! !             \n" ;
gotoxy(17,5); cout<<"    ! !   ! !!!!! !   ! !!!!! !        \n " ;
gotoxy(17,6); cout<<"    ! !   ! !               ! !           \n " ;
gotoxy(17,7); cout<<"    ! !   ! !         !!!!!!! !      \n " ;
gotoxy(22,10);cout<<"1.ABOUT IPS\n";
gotoxy(22,12);cout<<"2.ELIGIBILITY \n";
gotoxy(22,14);cout<<"3.PROCEDURE \n";
gotoxy(22,16);cout<<"4.APPLY ONLINE \n";
gotoxy(22,18);cout<<"5.MAIN MENU    \n";
gotoxy(22,20);cout<<"Enter your choice(1,2,3,4 or 5): ";}
void alli()
{ips z;
nda x;
int p,r;
z.startup();
cin>>p;
if(p==1)
z.about();
else
if(p==2)
z.elg();
if(p==3)
z.procedure();
else
if(p==4)
{
x.input();
z.edi();
x.output();
z.edc();
rid2();}}
void ips::about()
{system("cls");
char c;
gotoxy(25,1);cout<<" INDIAN POLICE SERVICE \n";
cout<<"Since past few years, employment in India is at its best; never mind the insecurity that dangles over the Indian economy. Though the mushrooming of private sectors has produced plenty of employment opportunities for youths, but the pressureand deadline are few traits that today's corporate world expect from their employees. After much dedication and hard work, the security of jobs keeps bothering employees. Keeping this thing in mind, there are many of us who aspire of attaining higher position in civil services. Civil Services not only offers job securities but also power, prestige, idealism and ability to change the system from within.  ";
cout<<"As far as Civil Services are concerned, IPS has no analogous in terms of above mentioned traits. Like IAS, IPS too makes an integral part of the Indian system. IPS comprises of higher level police officials, especially concerned withthe maintenance of law and order across the country. ";
cout<<"But, IPS service has an outer surface that reflects only few attributes like comfortable job and numerous benefits. However, the job consists of massive challenges that require a perfect skill to tackle.";
cout<<"Every year, lacs of aspirants apply to get admission into IPS. However, the procedure to become IPS is same as IAS. Aspirants have to go throughits competitive exam i.e. CSE (Civil Service Examination) held every year under the supervision of Union Public Service Commission (UPSC).";
gotoxy(25,25);cout<<"press any key to go back ";
cin>>c;
alli();}
void ips::elg()
{system("cls");
char c;
gotoxy(25,1);cout<<"ELIGIBILITY \n";
cout<<"(a) Nationality : \n";
cout<<"A candidate must either be : \n";
cout<<"1.a citizen of India, or \n";
cout<<"2.a subject of Bhutan, or \n";
cout<<"3.a subject of Nepal \n";
cout<<"\n";
cout<<"(b) Age Limits, Sex and Marital Status : \n";
cout<<"A candidate must have attained the age of 21 years and must not have attained the age of 32 years.";
cout<<"\n";
cout<<"(c) Educational Qualifications : \n";
cout<<"The candidate must hold a degree of any of University incorporated by an Act of the Central or State Legislature in India or other educational institutions established by an Act of Parliament or declared to be deemed as a University Under Section-3 of the University Grants Commission Act, 1956, or possess an equivalentqualification.";
gotoxy(25,25);cout<<"press any key to go back ";
cin>>c;
alli();
 }
void ips::procedure()
{system("cls");
char c;
gotoxy(30,1);cout<<"PROCEDURE \n";
cout<<"Applicants to the CDS are selected via a written exam conducted by the UPSC first is the CIVIL SERVICES (PRELIMINARY) EXAM 2015 and than the applicants who qualify give CIVIL SERVICES (MAIN) EXAM 2015, followed by extensive interviews covering general aptitude, psychological testing, team skills as well as physical andsocial skills, along with medical tests. Incoming classes are accepted once. Thenumber of candidates cadets accepted to the academy each semester are limited and counted so a candidate is advised to prepare well for examination also the competition for the limited seats is very tough.";
gotoxy(25,25);cout<<"press any key to go back ";
cin>>c;
alli();
 }
 //****** ********************ENQUIRY*********************
// *****************************************************
  void help:: enquiry()
  {system("cls");
int r,p;
gotoxy(17,1);cout<<"          FACILATION COUNTER \n";
gotoxy(17,3); cout<<"   ! !   ! !  ! !!!!!! ! !      ! !!!! ! \n " ;
gotoxy(17,4); cout<<"   ! !   ! !  ! !      ! !      ! !  ! !        \n" ;
gotoxy(17,5); cout<<"   ! !!!!! !  ! !!!!!! ! !      ! !!!! !        \n " ;
gotoxy(17,6); cout<<"   ! !   ! !  ! !      ! !      ! !        \n " ;
gotoxy(17,7); cout<<"   ! !   ! !  ! !!!!!! ! !!!!!! ! !      \n " ;
gotoxy(20,12);cout<<"   1. Modify your form \n";
gotoxy(20,14);cout<<"   2. Search your form  \n";
gotoxy(20,16);cout<<"   3. Contact address    \n";
gotoxy(20,18);cout<<"   4. Examination center  \n";
gotoxy(20,20);cout<<"   5. Exit    \n";
gotoxy(20,22);cout<<"   Enter your choice(1,2,3,4 or 5)  ";
}


void alle(){
system("cls");
help q;
q.enquiry();
int r;
cin>>r;
if(r==1)
q.enter();
else if(r==2)
q.search();
else if(r==3)
q.contact();
else if(r==4)
q.exam();
else if(r==5)
exit(0);}


//void update()
//{system("cls");
//int o;
//fstream fin;
//nda x;
//fin.open("online.dat",ios::in|ios::out|ios::binary);
//fin.read((char*)&x,sizeof(x));
//while(!(fin.eof()))
//{{if(o==1230)
//{
//x.input();
//fin.seekp(fin.tellg()-sizeof(x));
//fin.write((char*)&x,sizeof(x));
//break;}
//else
//fin.read((char*)&x,sizeof(x));}
//if(o==1231)
//{
//{x.input();
//fin.seekp(fin.tellg()-sizeof(x));
//fin.write((char*)&x,sizeof(x));
//break;}
//else
//fin.read((char*)&x,sizeof(x));}}
//if(o==1232)
//{{
//x.input();
//fin.seekp(fin.tellg()-sizeof(x));
//fin.write((char*)&x,sizeof(x));
//break;}
//else
//fin.read((char*)&x,sizeof(x));}}}
//fin.close();}






void help:: exam()
{int o;
char d;
nda x;
cds y;
ips z;
int p;

int a=11;
int b=24;
int c=32;
system("cls");
cout<<"Enter your registration ID : ";
cin>>o;
gotoxy(25,25);
cout<<"Press any key to continue ";
gotoxy(50,25);
cin>>p;
if((o==a))
{system("cls");
gotoxy(25,2);
cout<<"EXAMINATION CENTER : DELHI \n";
cout<<"\n\n\n";
cout<<"COMPLETE ADDRESS : UPSC Hall no 5,4th floor Shahjahan road,India gate New delhi \n";
cout<<"\n\n";
cout<<"IMPORTANT GUIDELINES\n";
cout<<"1.Candidates must use black ball pen only for writing and marking the answers. \n";
cout<<"2.Mobile phones,bluetooth and communication devices are not allowed in the examination hall \n";
cout<<"3.Candidates should note that there is plenty for wrong answers \n";}
else if((o==b))
{system("cls");
gotoxy(25,2);
cout<<"EXAMINATION CENTER : PUNE \n";
cout<<"\n\n\n";
cout<<"COMPLETE ADDRESS : UPSC Hall no 5,2nd floor Pushkar-Navi Mumbai road,Pune\n";
cout<<"\n\n";
cout<<"IMPORTANT GUIDELINES\n";
cout<<"1.Candidates must use black ball pen only for writing and marking the answers. \n\n";
cout<<"2.Mobile phones,bluetooth and communication devices are not allowed in the examination hall \n";
cout<<"3.candidates should note that there is plenty for wrong answers \n";}
else if((o==c))
{system("cls");
gotoxy(25,2);
cout<<"EXAMINATION CENTER : LUCKNOW \n";
cout<<"\n\n\n";
cout<<"COMPLETE ADDRESS : Kendriya vidyalaya No. 2 - Hall no 5,3rd floor Main market,Lucknow \n";
cout<<"\n\n";
cout<<"IMPORTANT GUIDELINES\n";
cout<<"1.Candidates must use black ball pen only for writing and marking the answers. \n\n";
cout<<"2.Mobile phones,bluetooth and communication devices are not allowed in the examination hall \n";
cout<<"3.candidates should note that there is plenty for wrong answers \n";
gotoxy(25,25);cout<<"press any key to go back ";
cin>>d;
alle();}
}




void help::enter(){int o;
int p;
nda x;
cds y;
ips z;
int a=11;
int b=24;
int c=32;
system("cls");
gotoxy(25,1);
cout<<"Enter your registration ID : ";
gotoxy(49,1);
cin>>o;
gotoxy(25,25);
cout<<"Press any key to modify ";
gotoxy(49,25);
cin>>p;
if(o==a)
{system("cls");
x.output();
gotoxy(25,25);
cout<<"Press any key to modify ";
gotoxy(49,25);
cin>>p;}
if(o==b)
{y.output();
gotoxy(25,25);
cout<<"Press any key to modify ";
gotoxy(49,25);
cin>>p;}
if(o==c)
{z.output();
gotoxy(25,25);
cout<<"Press any key to modify ";
gotoxy(49,25);
cin>>p;}}



void help:: search()
{
nda x;
cds y;
ips z;
int o;
int p;
int a=11;
int b=24;
int c=32;
system("cls");
cout<<"Enter your registration ID : ";
cin>>o;
gotoxy(25,25);
cout<<"Press any key to continue ";
gotoxy(50,25);
cin>>p;
system("cls");
if(o==a)
x.output();
else if(o==b)
y.output();
else if(o==c)
z.output();}

void help:: contact(){char c;
system("cls");
gotoxy(25,1);cout<<"Contact Upsc \n";
cout<<"Address :Union Public Service Commision Shahjahan road India gate New delhi - 46 \n";
cout<<"\n";
cout<<"Upsc Facilation Counter Phone no:011-23385271,011-23381125,011-23098543 \n";
cout<<"\n";
cout<<"Website :www.upsc.gov.in \n";
cout<<"        :www.upsconline.nic.in \n";
cout<<"        :www.indianarmy.nic.in \n";
cout<<"        :www.nausenabharti.nic.in \n";
cout<<"        :www.carrerairforce.nic.in \n";
gotoxy(25,25);cout<<"press any key to go back ";
cin>>c;
alle();}





      int main()
      {system("cls");
      nda x;
      cds y;
      ips z;
      int r,p,q;
      upsc();
      cin>>r;
      if(r==1)
      alln();
      if(r==2)
      allc();
      else if(r==3)
      alli();
      else if(r==4)
      alle();
      else if(r==5)
      {exit(0);
      getch();}
      getch();
    return 0;  }

Post a Reply

Replies

Oldest  Newest  Rating
+1 Dan P · November 27, 2015
Hi Jenson,

The code that you have here is not great because it is not readable.

Your code should read like it is a book, allow the coder to flow.

Can I suggest that you refactor it and also use the code option on the tool bar when you are copying programs over
so that we can see it structured and with syntax highlighting.

int main()
{
system("cls");
nda x;
cds y;
ips z;
int r,p,q;

upsc();
cin>>r;
if(r==1)
alln();
if(r==2)
allc();
else if(r==3)
alli();
else if(r==4)
alle();
else if(r==5)
{
exit(0);
getch();
}
getch();
return 0;
}


Dan
  • 1

C++

107,271 followers
About

Used in many types of software including music players, video games, and many large scale applications.

Links
Moderators
Bucky Roberts Administrator