Hi,
I have the following code
void (*somevector[20])(someptr *ptr);
void foo(someptr * ptr){...}
void somefunction() {
do something with somevector[0];
}
void otherfunction() {
somevector[0]=foo;
somefunction();
}
It keeps telling me in somefunction that somevector[0] is null, even if I initialize it in otherfunction. What is the problem? Isnt somevector global anyway?
Thanks
deb
I have the following code
void (*somevector[20])(someptr *ptr);
void foo(someptr * ptr){...}
void somefunction() {
do something with somevector[0];
}
void otherfunction() {
somevector[0]=foo;
somefunction();
}
It keeps telling me in somefunction that somevector[0] is null, even if I initialize it in otherfunction. What is the problem? Isnt somevector global anyway?
Thanks
deb