Using cin in the application output instead of using a terminal
-
hello everyone, recently I came up with this problem, i have a program i C++ that in a certain moment wants the user to insert some data but when i ran the program and i saw the output on the application output it just "jump" the part where cin appears and the only way that i had to make that the program actually let me introduce some data was checking the run in terminal box, the question is, is there any way to make the program recognice cin in the application output? thanks in advance :)
-
hello everyone, recently I came up with this problem, i have a program i C++ that in a certain moment wants the user to insert some data but when i ran the program and i saw the output on the application output it just "jump" the part where cin appears and the only way that i had to make that the program actually let me introduce some data was checking the run in terminal box, the question is, is there any way to make the program recognice cin in the application output? thanks in advance :)
@luquemeister said in Using cin in the application output instead of using a terminal:
recognice cin in the application output?
That does not mean anything. From Qt Creator you need to enable the "run in terminal" so that it has somewhere to read from. From outside Cretaor you will need to run your application from a terminal (e.g.
xterm
) so that it has a standard input to read from.If you don't want to use any terminal you must get rid of
cin
(andcout
) and do everything as a UI operation with suitable widgets for input/output. -
@luquemeister said in Using cin in the application output instead of using a terminal:
recognice cin in the application output?
That does not mean anything. From Qt Creator you need to enable the "run in terminal" so that it has somewhere to read from. From outside Cretaor you will need to run your application from a terminal (e.g.
xterm
) so that it has a standard input to read from.If you don't want to use any terminal you must get rid of
cin
(andcout
) and do everything as a UI operation with suitable widgets for input/output.@JonB okay thank you very much :)