Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
関数の1つの中に関数があるクラスがあるとしexternます:
extern
A::foo(){ extern void fun(); fun(); }
私の質問は、extern関数の宣言をローカル以外に置く場所が他にあるかどうかです。たとえば、ファイル内のクラスの宣言の中で.h?
.h
関数宣言はデフォルトで「extern」であるため、次のように簡単に言えます。
void fun(); class::foo(){ fun(); }