Quantcast
Channel: SystemC Language Forum RSS Feed
Viewing all articles
Browse latest Browse all 595

Error:Array initialization in constructor

$
0
0

Hello

 

i have declared array as below, have to initialize as below in constructor.

 

 

struct hci_top : sc_module 
  

unsigned int const_matrix_arr[16];        

------

------

Constructor

hci_top(sc_module_name nm):sc_module(nm), host_hci_tar_socket("host_hci_tar_socket")
  {
    const_matrix_arr[16] = {2, 3, 1, 1, 1, 2, 3, 1, 1, 1, 2, 3, 3, 1, 1, 2};     // Initialization
 
  }
 
};
 
Error: 355: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x
../design/hci_top.cpp:355: error: cannot convert ‘<brace-enclosed initializer list>’ to ‘unsigned int’ in assignment
 
 
Regards
cam
 
 

Viewing all articles
Browse latest Browse all 595

Trending Articles