Syntax error : System verilog keyword 'void' is not expected to b used in this context

In reply to mperyer:

hi mperyer,

Many Thanks for the info. It worked for me. Now I am trying to do the following:

class A;
static function void main();
string mode1[3] = '{“chip”, “boundary”, “chain”};
string mode2[2] = '{“chip”, “chain”};
endfunction: main
endclass: A

class B;
static function void print_it(string details);
foreach(details[i]) begin
$display(details[i]);
end
endfunction: print_it
endclass:B

class C;
A test_mode;
B printing;
printing.print_it(test_mode.mode1);
endclass:C

This is what I am trying to do and I get the following error:
Member not found
Could not find member ‘mode1’ in class A