Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

const修饰的变量无法被外部引用 | 守望的个人博客 #231

Open
yanbinghu opened this issue May 9, 2021 · 0 comments
Open

Comments

@yanbinghu
Copy link
Owner

https://www.yanbinghu.com/2020/11/01/37071.html

const变量能被其他文件extern引用吗?为什么? 先来看一段代码: 12345678910111213// 来源:公众号编程珠玑// main.cc#include<stdio.h>// 引用外部定义的const_int变量extern const int const_int;int main(){ printf("const_int:%d\n",const_

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant