Hi,
i want to delete an element from queue. the delete method requires an index to delete the element.
i know the value which i want to delete. How can it be done ?
string queue_2[$];
initial begin
queue_2 = {"Red","Blue","Green"};
//i want to delete the BLUE element and i tried the below code but it end up with compilation error
//Delete Method
queue_2.delete(queue_2.find_first_index with (item == "BLUE"));
end
Below is error reported:
Arg. 'index' of 'delete': Cannot assign an unpacked type 'int $[$]' to a packed type 'int'