c++ a function that returns its line number
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/4452557/gettin-line-number-of-the-called-function">Gettin line number of the called function</a>  </p>
</blockquote>



<p>I'm debugging, and it's extremely useful for me to find a function that returns the position of this function in the code. More precisely, is there a function that can return the line number of the function in the code? For example, if I call f() in line x, the returned value is an integer x.</p>

<p>Thanks,
Michael</p>
