#444 A way to get the line number that the program is working on

open
nobody
None
5
2012-09-26
2006-11-04
Bryan Ritter
No

Summary: A way to get the line number that the program
is working on

A useful debugging tool would be a way to get the line
number that a program is on.
Ex: for use in cout << “ line number: “ << XXX <<
endl; etc...
It is possible to hard code a cout << "line number
XXX"; but if the program were to change the number of
lines before the cout, the cout << "line number XXX";
will no longer be correct.

Re-said again:

A variable that at pre-compile time will be replaced
with the line number that it is on, just for the
compiler, which would be updated before every time the
program compiles.

Feel free to pass this on to whoever can work on this.

Discussion

  • Bryan Ritter
    Bryan Ritter
    2006-11-04

    Logged In: YES
    user_id=683696

    There could also be a varible that gets the path, path+filename, filename, ...