Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
THIS_FILE
TRY
Collapse the table of content
Expand the table of content

THIS_FILE

Expands to the name of the file that is being compiled.

THIS_FILE

Remarks

The information is used by the ASSERT and VERIFY macros. The Application Wizard and code wizards place the macro in source code files they create.

Example

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

// __FILE__ is one of the six predefined ANSI C macros that the 
// compiler recognizes. 

See Also

MFC Macros and Globals | ASSERT | VERIFY

Show:
© 2015 Microsoft