<VS> the command line window is displayed in the MFC program.
When compiling the MFC program, I want to print the debugging information. After using cout, I found that the program did not automatically pop up the command line window as I imagined, and there was no place to view the output information. Baidu knows to manually call up the command line window to view the output information. Baidu introduces two methods. One is to create a command line window object in a program by adding code. Here is a simple method. Right-click solution to open the properties page. Choose "build event"> "post-build event"> "command line", and enter:
Editbin/SUBSYSTEM: CONSOLE $ (OUTDIR) \ $ (TargetFileName)
For example:
Clear the project and re-compileThe command line window is automatically opened after running. You can see the output of printf () and cout in the program. Note that
Space and slash direction. Do not enter
DescriptionThat column.