Dear Sir,
I am getting the following errors in running this program:
error C2466: cannot allocate an array of constant size 0
error C2133: 'matrix' : unknown size
Assume I am getting m and n through functions already written and declared in constructor.
SC_MODULE(sc_fifo_array)
{
public:
SC_HAS_PROCESS(sc_fifo_array);
sc_fifo_array(sc_module_name name_):sc_module(name_)
{
int m,n;
int *matrix[m];
for (int i=0; i<m; i++)
matrix=new int[n];
matrix[0][0]=20;
cout<<"\nmatrix="<<matrix[0][0]<<"\n";
}
public:
int m,n;
};
Does system C does not support variable size matrix?