|
-
January 22nd, 2003, 03:24 AM
#1
What is the function of __FILE__ and __LINE__?
Hi, everyone!
What is the meaning of __FILE__ and __LINE__ in the following code?
sprintf (s, "_Assert: %s, %d",__FILE__, __LINE__ )
Another question, where is the two variable defined?
Are they compile system variable?
Thanks in advance.
George
-
January 22nd, 2003, 04:46 AM
#2
They are preprocessor defined variables (and a part of the c++ standard) that mean exactly what they say. They transform after preprocessing to the line integer and the file name string. They are useful in debugging (which is what the sprintf is doing).
*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/
"It's hard to believe in something you don't understand." -- the sidhi X-files episode
galathaea: prankster, fablist, magician, liar
-
January 22nd, 2003, 05:33 AM
#3
Thanks!
George
Originally posted by galathaea
They are preprocessor defined variables (and a part of the c++ standard) that mean exactly what they say. They transform after preprocessing to the line integer and the file name string. They are useful in debugging (which is what the sprintf is doing).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|