print the line number in the source code

How do I print the line number of a specific line in the source code ?
It is needed to find the location of an error message .

there's a macro __LINE__ that gets the current line, thats two underscores either side, there's also __FILE__ for the name of the file and a few others.
Last edited on
Topic archived. No new replies allowed.