Okay so Im having an issue,and am not able to find the actual problem with the code. I have a runtime error at :
First-chance exception at 0x008b182b in OpSys.exe: 0xC0000005: Access violation reading location 0x00000000.
Unhandled exception at 0x008b182b in OpSys.exe: 0xC0000005: Access violation reading location 0x00000000.
I do not want to post too much of the code and violate my schools anticheating policy, however I am unable to find the issue, it occurs when running through this algorithm. It is highly likely that the issue is something that Im reading as logical but actually is not and someone else may see it right off the bat. If its not here let me know and I will change the code I have shown.
In advance, thank you for proofreading my code.
void Scheduler::rr(){
while((lp1.head != 0) || (lp2.head != 0) || (lp3.head != 0) || (lp4.head != 0) || (lp5.head != 0) || (lp6.head != 0) || (lp7.head != 0)|| (store.head != 0)){
temp1=prep.head;
temp2=store.head;
temp3=temp1;
sort();
if(prep.head==0){
return;
}
process = prep.head->p;
if(timehold==0){
temp1->remaining=temp1->burst;
}
temp1->remaining=r[process-1];
remainingtime=temp1->remaining-timeq;
timehold=temp1->remaining;
if(remainingtime>0){
temp1->remaining=remainingtime;
timehold=10;
rs[process]=temp1->remaining;
temp1=temp1->next;
}else{
rs[process]=temp1->remaining;
temp1=temp1->next;
timehold=0;
}
for(int i=0;i<tp;i++){
if(i!=process-1){
r[i]+=10;
}
}
if(process != 0) {
print();
printtrack = 1;
}else if((process == 0) && (printtrack == 1)){
print();
printtrack = 0;
}
manage();
}
}