Visual C++ Express Problem Help Please!

I used "Build Solution" to compile and link.
compiling, linking both successful.
it shows "Rebuild All: 1 successful, 0 failed, 0 skipped"

The problem is how to run the exe file. I press F5, it asks exe file name.
I can not find the exe file. I checked all files and only find a .dll file.

The error message is "Unable to start program a.dll. The system cannot find the file specified.". (a is my project name)

Perhaps you accidentally created a "DLL" project, rather than a "executable" project?
I checked the process of creating a new project again, and found that the new project does requires some choice. After choosing a "Win32" rather than the default "CLR", and choose "Win32 Console Application", it is OK to run.

But there is a new problem. The screen output appears on a dark window, but the window dispeared too quickly that I can not see it.
Last edited on
This is a console application. If you want to make it stay, there is a lot of controversy over the best way to do it.

If it works, you can just put this:
std::cin.get();
at the end of the main function, before the return statement. Then you must press a key to end the program.

Otherwise, see this thread: http://cplusplus.com/forum/beginner/1988/ (120 replies - happy reading :p)
Topic archived. No new replies allowed.