By properties I mean the C# style properties, with getters and setters.
I am interested to know why they are not a part of the C++ language. I am assuming such a feature must have been discussed while the specification was being written, and so it is a conscientious decision not to include it in the language.
C11 is the current and latest standard of the C programming language and, as the name suggests, this standard was adopted in 2011. The formal document describing the C11 standard is called ISO/IEC 9899:2011.
Without the standard library, you're entire reliant on your own code, any non-standard libraries that might be available to you, and any operating system system calls that you might be able to interface to (which might be considered non-standard library calls).
The latest C standard is ISO/IEC 9899:2018, also known as C17 as the final draft was published in 2018.
here is one implementation: http://www.codeguru.com/cpp/cpp/cpp_mfc/article.php/c4031/Implementing-a-Property-in-C.htm
int i = 5,j;
PropTest test;
test.Count = i; //-- call the set method --
j= test.Count; //-- call the get method --
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