LoginSignup
0
0

More than 5 years have passed since last update.

Effective C++ (3rd) > 33項 > 定義の検索 (ローカル、Derived、Base、グローバル)

Last updated at Posted at 2015-05-21

引用: Effective C++ 第3版

すると、コンパイラは、ここで使われているmf2の定義を見つけなければなりません。...まずローカルスコープ...Derivedのスコープを探します。...Baseのスコープを探します。...それでもなければ、グローバルスコープにまで進められます。

検索したらこういうのを見つけた
How to access a global variable within a local scope in C++

Don't do that...
...
You should be using ::x in order to access global variable in local scope.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0