I have come across this " :: " double colon syntax in many functions in a C file and I'm not at all sure what this is?!
My Googling results seems to say this is the GDB Scope Resolution Operator, although I haven't found many examples of this nor seen it mentioned before in C tutorials (it seems to appear a lot more in C++ source code..).
Also I've never yet used GDB.
Here is one example function from the C sourcecode I've found it in:
Player :: Move (Pos *f, Pos *t)
{
board->Move (f, t);
board->Dump ();
PaintBoard ();
return 1;
}
So I'm grateful for some good help and explanation of this "::" operator in C.
My C knowledge is very basic and just now I do not yet understand what the "- >" operators mean but I hope to figure out these all these operators and pointer actions in these functions as I learn more C!
:: is not C but is the C++ scope resolution operator (C++11, 3.3.6p2).
See http://en.wikipedia.org/wiki/Scope_resolution_operator for more information.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With