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.
ファイルが合計5つの関数で構成される場合、2つの関数のみから変数にアクセスする方法(グローバル宣言または静的宣言なし)
C ではできません。ファイルは、その種類の変数の境界を定義するコンパイル単位です。これは、staticそのファイルを編集または表示できる人は誰でも、そのファイル内のすべての関数を操作できるためです。本当に可視性を分離する必要がある場合は、関数を複数のファイルに分割する必要があります。
static