Advertisement
STANAANDREY

SRCSHOW

Feb 28th, 2023
908
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.30 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <unistd.h>
  3. #include <stdarg.h>
  4.  
  5. #define SRCSHOW(format, ...) \
  6.     printf("%s/%s [%d]: ", getcwd((char[100]){}, 100), __FILE__, __LINE__); \
  7.     printf(format, __VA_ARGS__); \
  8.     printf("\n"); \
  9.  
  10.  
  11. int main(void) {
  12.   SRCSHOW("x=%g, y=%g", 0.5, -7.9);
  13.   return 0;
  14. }
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement