cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
print the line number in the source code
print the line number in the source code
Dec 27, 2010 at 2:19pm UTC
gilit2
(11)
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 .
Dec 27, 2010 at 2:41pm UTC
quirkyusername
(792)
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
Dec 27, 2010 at 2:42pm UTC
Topic archived. No new replies allowed.