A way to get the line number that the program is working on
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
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.
Logged In: YES
user_id=683696
There could also be a varible that gets the path, path+filename, filename, ...