Shammer's Philosophy

My private adversaria

2010-06-18から1日間の記事一覧

C の static 変数

C

百聞は一見に如かず。やってみるべし。 #include <stdio.h> int g = 0; void static_test(){ static int x = 0; int y = 0; printf("Global Static Normal\n"); printf("====================\n"); printf("%6d %6d %6d\n", g++, x++, y++); printf("================</stdio.h>…