1、 默认状态下,const对象仅在文件内有效,即在不同文件中出现同名const变量的时候,其实相当于这些同名const是不同的东西。 如果想要在文件中共享const变量,可以在const变量不管是声明还是定义都添加extern关键词,这样就只需要定义一次。 2、 const的引用,不能通过引用改变 Read More
posted @ 2016-07-14 15:37 料峭 Views(196) Comments(0) Diggs(0)