+ 1

What does mean :: in c++?

a little question

31st Dec 2017, 9:33 AM
StopTim Studio
StopTim Studio - avatar
2 ответов
+ 4
It is used to access members inside a namespace namespace abc { int xzy; } void main() { std::cout<<abc::xyz<<std::endl; }
31st Dec 2017, 9:55 AM
romangraef
+ 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/
31st Dec 2017, 10:09 AM
Rishabh
Rishabh - avatar