fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void somefunction_(int arg0, const char* caller, int line)
  5. {
  6. printf("The value is %d\n", arg0);
  7. printf("function %s called from %s line %d\n", __FUNCTION__, caller, line);
  8. }
  9.  
  10. #define somefunction(a) somefunction_(a, __FUNCTION__, __LINE__)
  11. #define DEFAULT_VALUE 42
  12.  
  13. int main()
  14. {
  15. somefunction(DEFAULT_VALUE);
  16. return 0;
  17. }
Success #stdin #stdout 0.01s 5280KB
stdin
Standard input is empty
stdout
The value is 42
function somefunction_ called from main line 15