Hello. I am a beginner, I would like to ask a question. There is an announcement:
extern BOOL ttt, key;
Why extern is chosen is not entirely clear What is it?
Hello. I am a beginner, I would like to ask a question. There is an announcement:
extern BOOL ttt, key;
Why extern is chosen is not entirely clear What is it?
This means that the memory for these variables is allocated in some other .cpp file. Those. To successfully link a project, it is necessary that in one of the .cpp files of the project there was a declaration of variables without extern.
extern is a memory class modifier. It makes the described object or function global - available in all files of the program.
Why is extern chosen here? Well, one line does not understand this, it means there was a need.
Source: https://ru.stackoverflow.com/questions/19425/
All Articles