I'm trying to create a dynamic array of type int and using a for loop trying to assign a value to each element of the array. I'm getting a syntax error while doing so

In reply to ningyangverificationacademy:

int no_cores = 8;
rand int no_of_transactions;
int no_of_transactions_max = 10;
int no_of_transactions_min = 1;

int cores[];
cores = new[no_cores];
for(int i=0; i<no_cores; i++)begin
	cores[i]=i;
    end