명경백
가입: 2010년 9월 6일 올린 글: 6
|
올려짐: 2010년9월15일 21:03 주제: c 관련 함수에 이름을 사용하면 범위(scope)가 어떻게 되나요? |
|
|
함수 자체의 범위(scope)는 global 이 맞습니다. TCPL 2nd p83 아래줄에 보면
Normally, function names are global, visible to any part of the entire program. If a function is declared static, however, its name is invisible outside of the file in which it is declared. 라고 있습니다.
그리고 c++ 에서는 http://en.wikipedia.org/wiki/Scope_resolution_operator 에 보면 The scope resolution operator (: in C++ is used to define the already declared member functions (in the header file with the .hpp or the .h extension) of a particular class. In the .cpp file one can define the usual global functions or the member functions of the class. 라고 있습니다.
(시간이 없어서 wiki 로 대체 인용합니다.) |
|