I'm working on a simple database, and I'm trying to make it so that a student id is generated and then not approved till unique when adding a new record. So far, all I'm getting is the Windows error number...3435973836.
I also have a value for the index if that will help any
{
bool status;
bool done = false;
if (storage.size() == 0)
{ index = 0;
storage.push_back(myRecord); //first record = 0 location
msg = "Record successfully added!";
status = true;
done = true;
}
//checking to see if id field has duplicate
if (!done)
//entering a student ID
{unsignedint i;
myRecord.idField = storage[i].idField + 1; //<---where I'm trying to add id number
for (i = 0; i < storage.size() && (myRecord.idField > storage[i].idField); ++i)
if (i < storage.size() && myRecord.idField == storage[i].idField)
{
done = true;
status = false;
msg = "Record already exists!";
}
else
{
done = false;
}
}