A while ago I stumbled upon a C++ gem, a set of classes that through operator overloading and possibly some preprocessor tricks, let you define variables using in-code ASCII art:
Line x = |-----|; //x is 5 Line y = |---|; //y is 3 Rectangle r = +---+ | | +---+; //r is 3 by 1
and IIRC, it even had support for 3D figures!
But for the life of me I cannot remember the name of this library/header file/set of classes. What is it called?
I believe you are after Multi-Dimensional Analog Literals
http://www.eelis.net/C++/analogliterals.xhtml
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