Friday, February 15, 2008

Something Missing From C++

One feature I'd like to see is some way of declaring some data as being readabale by anyone but not writeable. Something like the 'friend' thing.
So if I have some thing called 'NPCHappiness' I could declare it read only, and anyone could get at it from any class, but nobody could change it.
As it is, we need to bung it a tedious 'GetNPCHappiness()', and make it private.
I know stuff like visual assist makes this easier, but its still untidy to my eyes. Am I missing something?

Links to this post:

Create a Link

<< Home