#include <stdio.h> int main(int argc, char* argv[]) { Record(); //每调用一次Number就会+1 return 0; } int Record() { static int nNumber = 0; nNumber++; return nNumber; }