kuchaguangjie 发表于 2013-1-26 12:30:28

c extern

c extern
 
extern, used to declare variable / function, so that to use them before define them,
a external variable / function could only be define once, but could be declare multiple times,
extern, just declare the types, but will not allocate memory, memory is allocated only when define,
 
header file:
usually, put extern into a header file, so that to include by other source files,
 
static:
you should not use extern on static variable/function,
页: [1]
查看完整版本: c extern