Qt Creator 's bug? If my program has scanf(), getchar() or some like them, It can't run!
-
wrote on 19 Aug 2019, 12:39 last edited by
I'm using Qt Creator in linux, Debian. No matter whether I install it with "apt install qtcreator", or with the ".run" installation file in the official website, the problem appears!
For example, if I try to run this program, it shows "starting ***(my program name)..." and can't go on.

However, if I delete the "getchar()", it can print "Hello World!"!

Similarly, if I use scanf() like getchar(), it also show that and can't go on!
Do anyone know how to sovle it? -
wrote on 19 Aug 2019, 12:57 last edited by
(I'm the questioner)
Besides, for the file which Qt Creator compiles out, if I run it directly, there is no problem. It just can't be run in Qt Creator. -
(I'm the questioner)
Besides, for the file which Qt Creator compiles out, if I run it directly, there is no problem. It just can't be run in Qt Creator.Hi @zzc2422
(your picture upload did not work, it seems, so I'm guessing).
Do you run your program in a terminal window or directly in Creators Application Output? Because the Application Output is really only an output, you cannot input anything there.
That is tracked by QTCREATORBUG-12453 and linked reports. Feel free to comment and vote there.
Regards
-
Hi @zzc2422
(your picture upload did not work, it seems, so I'm guessing).
Do you run your program in a terminal window or directly in Creators Application Output? Because the Application Output is really only an output, you cannot input anything there.
That is tracked by QTCREATORBUG-12453 and linked reports. Feel free to comment and vote there.
Regards
-
@aha_1980 Thank you! So I tried to use the setting to run in terminal. I used to fail, but then I found the problem is in my terminal.
After all, I can run in terminal now!
1/5