My question is about when the function should be referred to in the extern
keyword.
I have failed to see when it should be used in practice. As I am writing a program, all the functions I use are made available through header files. So why not get highlighted in the header file will be useful for extern
to gain access to something?
I could imagine how extern
works incorrectly, and if so please correct me.
Edit: Should you do something extern
when a header file has a default declaration without keywords?
" extension
" replaces linkage, with keywords, functions / variables Is considered to be available elsewhere and the solvent solver is postponed.
There is a difference between the functions and variables in "Extra": On variables it does not have the variable itself Instant, i.e. does not allocate any memory, it should be done somewhere else. So this is important if you want to import the variable from somewhere to the works, it only tells the compiler that the linkage is the extension. Since this is the default (you use the keyword "factic" to indicate that the function is not bound by exton linking) you do not need to use it explicitly.
Comments
Post a Comment