LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

anci c instruction :- system("pause"); crashing in labwindows

Hello All,
I want to pause my program while execution. My programming language is C, lex and yacc.
I tried with,
1. getch:- no conio.h
2. system("pause");   ::::: system crashing
 
Please help,How can I halt my program while executing?
 I am using simple printf ststements here. 
 
Raghavendra
0 Kudos
Message 1 of 3
(4,362 Views)
If you can't use the ANSI getchar() or the CVI GetKey() functions, then maybe you can use the CVI KeyHit() function. Its in the utility library.
 
JR
0 Kudos
Message 2 of 3
(4,354 Views)
Because "pause" is a shell command, you should probably try system("cmd /C pause") instead of system("pause"). Also, you should probably check the Create Console Application box in the Target Settings dialog so that cmd does not spawn a new console for this.
Message 3 of 3
(4,328 Views)