This is the scope operator. It is needed when you want to reference static member functions from outside the class, or define member functions outside the class. It is also needed when using types or functions from a namespace (e.g., std::cout, std::cin, std::string, etc.)

Example

class Test{ public: Test(); static void print() { std::cout<<"Test"<<endl; //Use :: with namespaces } private: int a; }; Test::Test() : a(1) //Use :: when defining {} Test::get(); //Use :: when using static member functions