- 论坛徽章:
- 0
|
static global variables can only be accessed by the functions defined in the same file.
usually this usage is to encapsulate infomation in .c or .cc files; they can not be
exported by the "extern" storage specifier to the .h files
static local variables can only be accessed by the function in which they are defined.
this usage is also for encapsulation, however, in this case, on the function level.
static class members are declared in the .h files. except for the members of const int type,
which can be initialized in the class declaration, all members of other types should be
initialize outside the class declaration, usually in .cc or .cpp files. Note ,however, it
can not be initialized in the class constructor's initialization list.
水平的提高,除了数量,还得看质量,到了一定层次,甚至质量会占上风。对看些经典书籍吧!
努力提高自我。希望有朝一日,我们的祖国能强盛到这样的地步:台湾主动要求回归,而不是
现在这种尴尬局面。 |
|