yeah, thanks guys it worked out, made a static function that return a **pointer, which done the job.
If you dont mind asking here 1 more question, i dont wanna open another topic.
I have that same vektor, and an object at 9th position. At the end of the main i'm calling function:
1 2 3 4 5 6
|
void Class::delete(){
for(int i=0; i<256; i++){
if(vektor[i]) delete vektor[i];
}
delete [] vektor;
}
|
the strangest this is happening, since all entries are NULL except for entry 9, after i comes to 9, it calls the destructor which does 2 instructions:
1 2 3 4 5 6
|
Class::~Class(){
if(entryNumber == 9){
setvect(entryNumber,oldInterrupt); // restoring the interrupt routine
vektor[entryNumber] = 0;
}
}
|
and as soon as it exits the destructor, and gets back to the for loop, all other entries are not NULL anymore, they get some kind of adress 0395:0054 and so on (concrete situation in my case)
Is there any way to avoid that? :/ or why is it happening?