Skip to content

Commit

Permalink
Changed List Declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
moazmohamed20 committed May 24, 2022
1 parent 97ded95 commit be0f059
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Process Scheduling Algorithms/FCFS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ int FirstComeFirstServed(Process processes[], int size)
sort(processes, size);

// Copy Received Processes List To New List
Process *list = new Process[size];
Process list[size];
for (int i = 0; i < size; i++)
list[i] = processes[i];

Expand Down
2 changes: 1 addition & 1 deletion Process Scheduling Algorithms/Priority.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ int Priority(Process processes[], int size, bool preemptive)
sort(processes, size);

// Copy Received Processes List To New List
Process *list = new Process[size];
Process list[size];
for (int i = 0; i < size; i++)
list[i] = processes[i];

Expand Down
2 changes: 1 addition & 1 deletion Process Scheduling Algorithms/RR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ int RoundRobin(Process processes[], int size, int quantum)
sort(processes, size);

// Copy Received Processes List To New List
Process *list = new Process[size];
Process list[size];
for (int i = 0; i < size; i++)
list[i] = processes[i];

Expand Down
2 changes: 1 addition & 1 deletion Process Scheduling Algorithms/SJF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ int ShortestJobFirst(Process processes[], int size, bool preemptive)
sort(processes, size);

// Copy Received Processes List To New List
Process *list = new Process[size];
Process list[size];
for (int i = 0; i < size; i++)
list[i] = processes[i];

Expand Down

0 comments on commit be0f059

Please sign in to comment.