Reputation: 954
I've seen ::
in some documentations, e.g., xn::Generator::StartGenerating()
, and was wondering what it exactly signified?
Upvotes: 0
Views: 5501
Reputation: 54021
To add to the answers already here, after doing a quick google for "Double colon notation" I came across the following for PHP:
In short, it’s used to access Static or Constant members of a class
Source: http://www.whypad.com/posts/php-using-the-double-colon/500/
There's a brief discussion here on Stack Overflow also on the differences between the double colon and and arrow operators.
Upvotes: 0
Reputation: 360016
It's the scope resolution operator in C++.
http://en.wikipedia.org/wiki/Scope_resolution_operator
See also: whats the difference between dot operator and scope resolution operator.
Upvotes: 3
Reputation: 28332
In C++, that's scoping names so that it can tell what you're talking about. Namespace (like std::cout) and class member definitions (like MyClass::MyMethod) come to mind.
Upvotes: 1
Reputation: 14233
In C++ at least, it refers to some sort of scope resolution. This could be a namespace (for example StartGenerating
is a function within the namespace Generator
), or it could be a class (for example StartGenerating
is a static function in the class Generator
)
Either way, it narrows the scope in which C++ will search for an identifier.
Upvotes: 0