6.4 Introduction to global variables

주홍영·2022년 3월 12일
0

Learncpp.com

목록 보기
63/199

https://www.learncpp.com/cpp-tutorial/introduction-to-global-variables/

이번 섹션에서는 global variables에 대해서 다룬다

함수 밖에서 선언 정의된 varialbe을 global variable이라고 한다

Global variables have file scope and static duration

global variable은 파일 전체에서 접근할 수 있다
file scope를 가지고 있다
그리고 프로그램이 종료되어야지 해제되기 때문에 static duration 을 가지고 있다고 불린다.

profile
청룡동거주민

0개의 댓글