How To Search and compare array using fileing

HI alll:), i need some Help from you guy'z... . . Em making DATABASE. .. .and save applicents Recoard.. .NIC, Name, father name,etc;
but after that i want ko read that data... . the applicant only view there NIC number if Matched so data will show otherwise program exit.. .


Em having problem in COMPARING the save One and NEW enterd at run time


DO Reply... . .THANKZ
Last edited on
Ummmmm... What did you say? I stopped reading after the first 10 confusing spelling/grammar errors.
http://cplusplus.com/forum/beginner/1/
Last edited on
closed account (S6k9GNh0)
Just because were a group of hacking C++ programmers that are indeed, "1337", doesn't mean we can all understand 1337 talk, especially when someone who understands 1337 talk can't make out what your saying. Please reformat your sentencing and grammar to where anyone would be able to read it.

And post code if you can. Use [CODE] tags please!
What the guys here are saying is that the cultural norm on this forum generally leans toward more formal language. And if English is not your native language we will be very forgiving; just let us know.
Also a clearly defined problem not just one of those "I need help making ________." We really can't help much at all until we can see for ourselves what kind of problem you are having.
Yeah.. .. kevinkjt2000 ma native language is not ENGLISH.. . .. ... and we are here for C++ not for ENGLISH


but i apologize if you don't understand.
thanx by the way
Nobody cares if this is an English-related forum. The language is English, that's what you write in here, and you do so coherently or you get told to do otherwise.
So got any actual code? I can't even tell if you are doing this in C++.
# include <fstream.h>
# include <conio.h>
# include <stdio.h>
# include <string.h>
# include <iomanip.h>
# include <process.h>

struct applicant
{
char nic[17];
char name[30];
char fathername[30];
char fnic[17];
char quli[20];
char addcourse[30];
char exp[50];
char ph1[13];
char ph2[13];
char email[40];
};

void newdata();
void menu();
void admin();

void menu()
{
clrscr();
cout<<"---------------------DATABASE SYSTEM OF NEW EMPLOYEES---------------------------";
cout<<"\n\n\n\n \t ----- WORKING CHOICES ------";
cout<<"\n\n\t \t Press 'N' To ENTER DATA ";
cout<<"\n \t Press 'A' for ADMINISTRATOR ";
cout<<"\n \t Press 'E' TO EXIT";
cout<<"\n\n\n\n\n Enter Your choice ";
char press;
cin>>press;
switch(press)
{
case 'N':
newdata();
break;
case 'n':
newdata();
break;
case 'a':
pass();
break;
case 'A':
pass();
break;
case 'E':
exit(2);
break;
case 'e':
exit(2);
break;

default:
introduction();
}
}
void newdata()
{ ofstream f("applicant.txt",ios::app);
clrscr();
cout<<" \t ****** DATABASE SYSTEM FOR NEW EMPLOYEES ******";
cout<<"\n\n\n\n////////////////////// ENTER YOUR DATA ////////////////////////";
applicant s;
cout<<"\nENTER NIC NO ";
gets(s.nic);
cout<<"\nENTER NAME ";
gets(s.name);
cout<<"\nENTER FATHER NAME ";
gets(s.fathername);
cout<<"\nENTER FATHER NIC NO ";
gets(s.fnic);
cout<<"\nENTER QUALIFICATION ";
gets(s.quli);
cout<<"\nENTER ADDITIONAL COURSR ";
gets(s.addcourse);
cout<<"\nENTER EXPERIENCE ";
gets(s.exp);
cout<<"\nENTER PHONE NO.1 ";
gets(s.ph1);
cout<<"\nENTER PHONE NO.2 ";
gets(s.ph2);
cout<<"\nENTER E-MAIL ADDRESS ";
gets(s.email);

////////////////////////////////////////// WRITE DATA ON FILE /////////////////////////////////////////
f<<endl<<"***************************";
f<<"\nNIC No |"<<s.nic;
f<<"\nAPPLICANT NAME |"<<s.name;
f<<"\nFATHER Nam |"<<s.fathername;
f<<"\nFATHER NIC NO |"<<s.fnic;
f<<"\nQULIFICATION |"<<s.quli;
f<<"\nADDITIONAL COURSE |"<<s.addcourse;
f<<"\nEXPERENCE |"<<s.exp;
f<<"\nPHINE NO 1 |"<<s.ph1;
f<<"\nPHINE NO 2 |"<<s.ph2;
f<<"\nE-MAIL ADDRESS |"<<s.email;

}
void admin()
{
clrscr();
char str;
ifstream filein("applicant.txt",ios::in);

while(!filein.eof())
{
filein.get(str);
cout<<str;

}
getch();
menu();
}
this is part of my program

i want that, if user Enter his NIC No. so all information about him will appear
NOw???? understand or not?
NO. PUT IT IN CODE TAGS.
It is YOUR responsibility to make things clear, not MINE to understand. Get that through your head.
okay i'll don't be agree cool down dude
Be co-operative and if you understand my prob so please solve it. . ..
closed account (S6k9GNh0)
Well, this is getting nowhere.

ADii, http://cplusplus.com/articles/firedraco1/
Topic archived. No new replies allowed.