Joh*_*ohn 6 c variables global declaration duplicates
为什么这在全球范围内有效:
static int a;
static int a=0;
Run Code Online (Sandbox Code Playgroud)
但不在函数体内:
void foo()
{
static int b;
static int b=0; //error: Duplicate declaration of global variable 'b'
...
Run Code Online (Sandbox Code Playgroud)
使用clion 2017.3.1,C99,gcc5.4