I have setup everything. When I click Ctrl+F5, it does not show anything. I just want it to show my name with a black window. How do I do that?
相关问题
- Sorting 3 numbers without branching [closed]
- How to compile C++ code in GDB?
- Why does const allow implicit conversion of refere
- How to know full paths to DLL's from .csproj f
- Importing NuGet references through a local project
相关文章
- How to show location of errors, references to memb
- Class layout in C++: Why are members sometimes ord
- How to mock methods return object with deleted cop
- Which is the best way to multiply a large and spar
- How to track MongoDB requests from a console appli
- C++ default constructor does not initialize pointe
- Selecting only the first few characters in a strin
- What exactly do pointers store? (C++)
Instead of running your program from within the development environment, open a Command Prompt window and navigate to the folder where the .exe is created and run it directly. That's how command-line programs are meant to be run.
If you have to run it in the development environment, perhaps for debugging, then put a breakpoint on the
return
orexit
statement so it stops before the window is closed.Most likely you have the subsystem set to "Windows application", which means the process will start with no console associated. Attempts to write will then fail.
You can either associate a console with
AttachConsole()
and/orAllocConsole()
or change the subsystem via linker command line (/SUBSYSTEM:CONSOLE
).