正在加载图片...
Reviewing C in C++(cont) int funCAO static intⅸ=0 int funCAO static intⅸ=0 a Function can" remember >> ix is a local oloba/ i between calls variable” to the file But iX is unavailable Its scope is only in outside the function its this file scope is in this functionReviewing C in C++ (cont.) int funcA() { static int iX = 0; } ◼ iX is a “local global variable” to the file ◼ Its scope is only in this file ◼ Function can “remember ” iX between calls ◼ But iX is unavailable outside the function, its scope is in this function static int iX = 0; int funcA() { … }
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有