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
Printable View
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
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).
Thanks!
George
Quote:
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).