I'm making a program to store the records of a school/university and i'm saving the data to a binary file.(Default binary file = database.inl, can be modified)
I collect the data from the user, but i need to check that the IDs is not stored already before continuing... that's where i'm stuck :/
1 2 3 4 5 6 7 8 9
cout << "Numero de ID: ";
cin >> tempStu.id; cout << endl;
while(tempStu.id < 0)
{...}
record.open(output, ios::in | ios::binary);
if(record.is_open())//If the file is new there's no need for the query-
{
//Here I'm having troubles getting the program to compare the whole .inl with tempStu.id
}
And the easy part(when i finish collecting the data :P)
So I don't know how to go on, i have something in mind but is way too dumb, tedious and time-wasting that i guess there should be another way... Is there? Thanks beforehand!