I was refreshing my mind on C++ template classes and defines today when I thought of a nice optimization if it could be possible.
I want to use a #define to add a set of dynamic properties and methods to a class. For example: the macro would add a World property, a GetWorld method, and a SetWorld method. The tricky part is the “World” part of the names would be dynamic.
And it works beautifully. Check out the details in the post.
Forum: [post]