candam
Member
|
undertstanding code syntax
Hello Esenthel Community
I would like to know some syntax that I don't know in C++
like
::Client& client(Int i) {return (::Client&)clients.lockedData(i);}
what those :: does in here ?
one more example is like that too
.Client& client(Int i) {return (.Client&)clients.lockedData(i);}
what this dot is doing in here
I would like somebody to clarify this for me
Thank you
|
|
01-22-2014 03:46 PM |
|
Zervox
Member
|
RE: undertstanding code syntax
Just accessing global namespace(Although I can't see any need to use them in this case) from what I can see, like doing Game.Chr or the likes. I am assuming this question is in regards to an EE example project, visual studio vs code editor?
(This post was last modified: 01-22-2014 06:09 PM by Zervox.)
|
|
01-22-2014 06:06 PM |
|
candam
Member
|
RE: undertstanding code syntax
(01-22-2014 06:06 PM)Zervox Wrote: Just accessing global namespace(Although I can't see any need to use them in this case) from what I can see, like doing Game.Chr or the likes. I am assuming this question is in regards to an EE example project, visual studio vs code editor?
Thank you this cleared up something
(This post was last modified: 01-22-2014 06:17 PM by candam.)
|
|
01-22-2014 06:16 PM |
|
Esenthel
Administrator
|
RE: undertstanding code syntax
Yes, that means accessing a symbol starting from global namespace (and not current space).
For this tutorial, if you middle mouse click on the symbol, then you will notice that it relocates you to a different Client class (there are 2 Client classes in this tutorial), possibly something like that:
.EE.ConnectionServer.Client
.Client
|
|
01-22-2014 11:42 PM |
|
candam
Member
|
RE: undertstanding code syntax
Thank You Greg . I find that information very useful thank you for help
|
|
01-23-2014 12:03 AM |
|