title: Hidden/Anchored argument of a function?
body: <p>I want to have an extra function that checks if an input function returns 0. The extra function would exit the program if so and print the number of line where it happened. I wrote this:</p>
  
  <pre><code> void check( int function_return_value, int line_with_error )
      {
          if(!function_return_value )
          {
              printf("Error on line %d\n", line_with_error );
              exit(EXIT_FAILURE);
          }
      }
  </code></pre>
  
  <p>line_with_error recieves a value of <strong>LINE</strong> macro inside my main code file and it looks like this</p>
  
  <pre><code>check( function(), __LINE__ );
  </code></pre>
  
  <p>However I don't want "check" function to take 2 arguments, just 1 with function return value. Is there a way to somehow "hide" the second argument so that the function knows that <strong>LINE</strong> macro will always go there but I don't have to write it every time?</p>
  
  <p>P.S. <strong>LINE</strong> will take the number of a line where it is written in a code. I can't put it inside "check" function since it will always refer to the line inside the declaration of function</p>