声明与定义

阅读 75

2023-04-11


extern int i;//声明但未定义
int j;//声明并定义

extern int a = 0;//定义,如果写在函数内是错的,但可以写在函数外

Varibles must be defined exactly once but can be declared many times;

变量只能被定义一次但可以被声明多次。

相关推荐

精彩评论(0)

0 0 举报