问题:
What is the difference between static const
and const
? static const
和const
什么区别? 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?你什么时候会使用一个?
What is the difference between static const
and const
? static const
和const
什么区别? 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?你什么时候会使用一个?