your_program.exe @pauseSo, command line will pause with "Press any key to continue..." message when your program is done and you will be able to examine the output.
Showing posts with label Visual Studio 2010. Show all posts
Showing posts with label Visual Studio 2010. Show all posts
Saturday, September 29, 2012
Pause Console Application in the End
If you want to pause your Visual Studio console application in the end, there is no need to insert something like Console.ReadKey().
If you run your application with Ctrl-F5 (Run without Debug) then Visual Studio creates and runs a batch file that look something like that:
Input Arguments for Console Application in VS
If you want to run your console application from Visual Studio (Ctrl-F5) and you need some input arguments that you need to specify them in Project -> Properties -> Debug -> Start Options -> Command line arguments.
Sunday, February 26, 2012
How to Port PThread-Win32
Finally got it!
Also, use Sleep() for Windows (add #include <Windows.h>) and sleep() (add #include <unistd.h>) for UNIX-based systems.
- Put your .h files (pthread.h, semaphore.h, sched.h) into $Visual_Studio/VC/include.
- pthreadVC1.dll goes to C:/Windows. Not the best idea but I am out of time and this works.
- pthreadVC1.lib goes to $Visual_Studio/VC/lib. Also, include it in the Linker. Project Properties -> Configuration Properties -> Linker -> Input -> Additional Dependencies. Add there pthreadVC1.lib.
Also, use Sleep() for Windows (add #include <Windows.h>) and sleep() (add #include <unistd.h>) for UNIX-based systems.
Subscribe to:
Posts (Atom)