静态常量和常量有什么区别? - What is the difference between static const and const?

问题:

What is the difference between static const and const ? static constconst什么区别? For example:例如:

static const int a=5;
const int i=5;

Is there any difference between them?它们之间有什么区别吗? When would you use one over the other?你什么时候会使用一个?


解决方案:

参考: https://stackoom.com/en/question/tKDP
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章