#include <stdio.h>
void Sub(static int x)
{
static int z = 4;
printf("%d %d\n",x,z);
}
void main()
{
static int a=3;
{
static int b=5;
printf("%d %d\n",a,b);
}
Sub(9);
printf("%d",a);
}
저렇게 하니깐 Sub 함수 static 선언한거에서 스토리지 클래스에서는 static 이 허용이 안된다는 에러가 나오네요
없애도 상관은 없지만.. int 앞에 기억류를 안쓰면 auto 로 인식된다고 들었습니다.
그거랑은 상관없는건가요? ...
아시는 분 좀 알려주시면 감사요..
|