Properties in C++20

C++ doesn't support getter/setter style properties. But you can get pretty darn close with templates or macros. #include #include "properties.h" using namespace std; class User { private: int mId; int mWeight; int mPurse; int mBank; public: // Non-auto property only supporting get (runtime check) Property Id{{ .get = mId }}; Property Purse

Page Up & Page Down with Kilo Editor

I've recently started going through this brilliant article on creating your own text editor (read: nano/pico clone). If you've never built one this article breaks it down into easy to follow chunks. If you do go through it, you might notice the same thing I did. Page Up and…