Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29249 Discussions

Console program won't wait for me to "press any key ..."

michael_green
Beginner
330 Views
I'm using a CVF Windows program as a front end for running a number of console programs. To do this for a particular program I use the following:

if(CreateProcess(null,trim(fmis$exec)// &
'PPintersect.exe'//char(0), &
null,null,false,0,null,null,si,pi)==0)then

If the program PPintersect is run as a standalone, the console outputs a log of progress and at completion asks me to "press any key to continue", which is exactly what I want to happen. But when the program is run via CreateProcess, it still works, but it doesn't wait for the "press any key .." bit, so users don't get the chance to view the log. Is there a way around this?

With many thanks in advance,

Mike
0 Kudos
1 Reply
Steven_L_Intel1
Employee
330 Views
The "press any key" is inserted by the IDE when you run a program from within it - it is not inherent in an application. See this article for an example of how to emulate that.
0 Kudos
Reply