+ 1
What does mean :: in c++?
a little question
2 ответов
+ 4
It is used to access members inside a namespace
namespace abc {
int xzy;
}
void main() {
std::cout<<abc::xyz<<std::endl;
}
+ 4
It's a scope resolution operator
it can also be used to access global variable when you have local variable also with the same name.
Check below Url
https://www.geeksforgeeks.org/scope-resolution-operator-in-c/