What is a scope res…
 
Notifications
Clear all

What is a scope resolution operator?

3 Posts
4 Users
2 Likes
375 Views
0
Topic starter

What is a scope resolution operator?

riyaponraj riyaponraj 07/04/2023 10:28 am

@jisha-c The scope resolution operator :: is used to identify and disambiguate identifiers used in different scopes.

2 Answers
1

A scope resolution operator is a symbol used in programming languages to access a variable or function within a particular scope. In many programming languages, the scope resolution operator is represented by the dot (.) symbol. 

For example, in Java, the dot operator is used to access methods and properties of an object, as in:

myObject.myMethod();

In C++, the scope resolution operator is used to access a member of a class or namespace, as in:

MyClass::myMethod();

In PHP, the double colon (::) is used as the scope resolution operator, and it is used to access static methods and properties of a class, as in:

MyClass::myStaticMethod();
This post was modified 2 years ago by BharatUpadhyay
1

As Neugodno Rotirati c++ scope operator mjerilo Ažuriraj Melbourne

Share: