Sorry, i thouhgt my error was generated by the declaration of an array of pointers as an extern. Actually adding
extern buffer_in** buf_in;
extern buffer_xp** buf_xp;
was enough (thanks Zhuge)
My error is of another type. Hope you can help me with this too. So...here it is:
1. I declare the two arrays of pointer
1 2
|
buffer_in **buf_in;
buffer_xp **buf_xp;
|
2. I create the two arrays of pointer (IN and OUT are defined):
1 2
|
buf_in = new buffer_in*[IN]();
buf_xp = new buffer_xp*[IN*OUT]();
|
3. I try to operate on the objects created in the following way:
1 2 3 4
|
for (i=0; i<IN; i++)
{
buf_in[i]->ingress_id=i;
}
|
where ingress_id is declared as below:
1 2 3 4 5
|
class buffer_in : public buffer {
public:
int ingress_id;
};
|
When i try to run the line
buf_in[i]->ingress_id=i;
i get the error:
Non managed exception at 0x008b6294 in Simulator.exe: 0xC0000005:
violation in access of the writing of the path 0x00000018. (this is a translation, i m running Visual C++ in italian)
Any idea please what is this error due to?
I guess i refer to the buf_in[i] I am interested to in the wrong way...
Any help is very welcome. Thanks.
Francesco