//
// Created by zhangrongxiang on 2017/9/12.
//
#include
#include "static.h"
// 彿°å£°æ
void func(void);
static int count = 10; /* å
¨å±åé */
int staticDemo() {
while (count--) {
func();
}
return 0;
}
// 彿°å®ä¹
void func(void) {
static int i = 5; // å±é¨éæåé
i++;
std::cout << "åé i 为 " << i;
std::cout << " , åé count 为 " << count << std::endl;
}