Hello All,
im trying to get some user input, compare it to the data stored in a .dat file and output all the information for the contact if the user input matches the data of the contact in the dat file. Here is a segment of my code:
Code:
cout<<"\nPlease Enter the Department You Wish to View: ";
cin>>dept;
while(i < counter)
{
indata.seekg(i * size, ios::beg);
indata.read (reinterpret_cast<char *> (&unistaff),
sizeof(unistaff));
if (strcmp(universitystaff->department) == (dept))
{
...............................
it gives me an error message and opens the string.h file. I tryed without strcmp a couple of ways i know but it just didnt work, any ideas?
Thanks.