There is a simple code with the different aspects of usage of :: operation.
namespace test{
int add(int x, int y){
return x + y;
}
}
int main(){
int x=3, y=5;
int r = ::test::add(x,y);
r = test::add(x,y);
}
or in another example
::std::cout << "Hello";
std::cout << "Hello";
The functionality of these codes (I mean the usage of :: before statement) is not different. Then why is it (::) used before statements?