We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Does anyone know how to get the pre-processor to spit out a substring? In this case, I want to include only the year from the __DATE__ macro. Something like:
#define YEAR=substr(8,4,__DATE__) const char code ROMSTRING={"COPYRIGHT " YEAR "by such and such company. Compiled on " __DATE__};
where the #define is something the pre-processor can handle.
Thanks
As Per says, the 'C' preprocessor has no such functionality.
However, in the specific case of copyright, this depends on the date that the text was written - not the date that it was compiled!