Ganesan R Posted July 28, 2017 Report Share Posted July 28, 2017 Dear Sir, I am new to System C. The problem is number of forums offering support to system c problems are few. As such I want help in understanding why this elementary program is not compiling. It returns error C2039: 'con_arrayfifo' : is not a member of 'arrayfifo'. Now the program: #include <systemc.h> SC_MODULE(arrayfifo) { SC_CTOR(arrayfifo) { SC_METHOD(con_arrayfifo); } }; void arrayfifo::con_arrayfifo (void) { //delcare the fifo //sc_fifo<int> rowfifo[n]; } int sc_main(int , char*[] ) { int m,n; cout << "Sadguru Jai Jai \n"; cout << "Enter the value of m: \t"; cin >> m; cout << "Enter the value of n: \t"; cin >> n; cout << m <<"\t" << n <<"\n"; arrayfifo arrayfifo1("arr_fifo"); //con_arrayfifo(m,n); //sc_fifo<int> rowfifo[n]; return 0; } The commented lines are intentional to find out why this program is not compiling. Thanks in advance for your patience and reply back. R. Ganesan Quote Link to comment Share on other sites More sharing options...
Roman Popov Posted July 28, 2017 Report Share Posted July 28, 2017 Well, it's not compiling because con_arrayfifo is not a member of arrayfifo... You should declare it as a method in class body. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.