Stringifying your C++ MACRO

Image Courtesy: Liam Briese (https://unsplash.com/photos/pH3OM-Vy3FM)
#define WARN_IF(EXP) \do { if (EXP) \
fprintf (stderr, "Warning: " #EXP "\n"); } \
while (0)
#define now then
#define is was
#define print(stuff) std::cout<<"["#stuff "]\n"
print(now is the time)

Pursuing Ph.D., Electrical Engineering | Intelligent Transportation & Quantum Science Researcher | https://www.buymeacoffee.com/rahulbhadani

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store