I am getting 3 errors, all for the same reason in two separate section of my code. I have looked around and have yet found a solution. The two seperate codes are:
void getRespRobin(int arrivals[], int n, int bursts[], int resps[], int quanta) {
// Make a copy of burst times burst_arr[] to store remaining
// burst times.
int final_arr[n];
for (int i = 0 ; i < n ; i++)
final_arr[i] = bursts[i];
void findavgTime(int option, int pids[], int arrivals[], int n, int bursts[], int quanta) {
int resp[n], ta_time[n], avg_resp_time = 0, avg_ta_time = 0;
The error I am getting for both is "expression must have a constant value. The value of parameter 'n' cannot be used as a constant"
Any recommendations?