How to get unique values at preprocessing across files
问题 PROBLEM I need a way to generate unique values using a preprocessor directive. The aim is that each time the macro is called, it will have a unique integral identifier. But it should retain it's value across files. Kind of like a preprocessor counter for the number of times a call is made to the function. FURTHER INFO The macro I am using is: #define LOG_MSG(a) log_msg(?) 'a' is a string that the user wants to print. log_msg is a custom function used to print a message on the UART The '?' if