About Store Forum Documentation Contact
Donations:
158$/mo



Post Reply 
undertstanding code syntax
Author Message
candam Offline
Member

Post: #1
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 smile
01-22-2014 03:46 PM
Find all posts by this user Quote this message in a reply
Zervox Offline
Member

Post: #2
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
Find all posts by this user Quote this message in a reply
candam Offline
Member

Post: #3
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 smile
(This post was last modified: 01-22-2014 06:17 PM by candam.)
01-22-2014 06:16 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
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
Find all posts by this user Quote this message in a reply
candam Offline
Member

Post: #5
RE: undertstanding code syntax
Thank You Greg . I find that information very useful thank you for help
01-23-2014 12:03 AM
Find all posts by this user Quote this message in a reply
Post Reply