What is the meaning of prepended double colon “::”?

前端 未结 9 2167
鱼传尺愫
鱼传尺愫 2020-11-22 15:54

I found this line of a code in a class which I have to modify:

::Configuration * tmpCo = m_configurationDB;//pointer to current db

and I do

9条回答
  •  广开言路
    2020-11-22 16:11

    "::" represents scope resolution operator. Functions/methods which have same name can be defined in two different classes. To access the methods of a particular class scope resolution operator is used.

提交回复
热议问题