Difference between internal and no linkage

前端 未结 3 1841
眼角桃花
眼角桃花 2021-02-02 14:22

Please refer to the following code that is in the same translation unit:

static int global_var; // file scope in C and global namespace scope in C++
                     


        
3条回答
  •  忘掉有多难
    2021-02-02 15:09

    global_var could be accessed from void g() in the same compilation unit, that is the difference.

提交回复
热议问题