|
Re: detecting your own alliance(C++)
The double colon ("::") is a namespace operator. For example, one of the namespaces in C++ is the standard namespace, "std". So you could say,
"std::cout" etc
since cout is in the std namespace.
You could also say at the beginning of your program:
"using namespace std;"
This would allow you to implicitly refer to the std namespace.
The dot operator is different. It allows you direct (non-pointer) access to data members of a class. For example, if you had some class Apple, you might have a call such as...
"myApple.color" which could be red, yellow, greeen, etc. I don't fully understand jtdowney's code, since I am not at all familiar with the new interface, but this is the meaning of the dot operator versus double colon.
|