摘要
变量的生命期是变量从创建到消亡的时间段,也称为变量的存在性,就是说一个变量是否还存在。变量的作用域是变量能被引用的范围,也称为变量的可见性,是指在变量存在的情况下能否被引用。一个变量若是可见的其必然存在,若其存在却不一定就可见。主要讨论了C++语言中变量的生命期、作用域、存在性及可见性等实际应用的问题。
Life cycle of a variation is the period in which a variation is created and disappears; it is also called as the existence of a variation. A variation's function is the scope in which it can be quoted, that is, the visibility of a variation, which means whether a variation is quoted in the period it exists. A visible variation does exist while an existing variation is not necessary visible. This paper mainly discusses the life cycle, scope, existence, and visibility of C++ language variations.
出处
《武汉工程职业技术学院学报》
2016年第4期37-40,共4页
Journal of Wuhan Engineering Institute