alaios
07-18-2005, 06:51 PM
Hi i have some questions in c... If u can help me :)
a)I am trying to understand the extern.. Today i have faced the following problem
int main(){
int isvisible;
creates-1-thread();
creates-2-thread();
creates-3-thread();
}
I have written the code for each function in a separate file
creates-1thread.h etc
In each function i use the extern int isvisible; but still the compiler says that the variable is not declared :(
When i have changed the position of isvisible and put it below int main() everything got smoothly
int isvisible
int main(){
...
}
Why??? :(
a)I am trying to understand the extern.. Today i have faced the following problem
int main(){
int isvisible;
creates-1-thread();
creates-2-thread();
creates-3-thread();
}
I have written the code for each function in a separate file
creates-1thread.h etc
In each function i use the extern int isvisible; but still the compiler says that the variable is not declared :(
When i have changed the position of isvisible and put it below int main() everything got smoothly
int isvisible
int main(){
...
}
Why??? :(