Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // for more info see see https://stackoverflow.com/a/34029868/5533075
- #include <stdarg.h>
- const logging = 0;
- /**
- *
- * Help function in order to ovveride printf and enabling printf when needed
- * // for more info see see https://stackoverflow.com/a/34029868/5533075
- */
- void mylog(const char *pString, ...)
- {
- if (logging == 0)
- {
- return;
- }
- va_list args;
- va_start(args, pString);
- vprintf(pString, args);
- va_end(args);
- }
- //example
- mylog("print me!");
- int test = 2;
- mylog("test var %i", test);
Advertisement
Add Comment
Please, Sign In to add comment