Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Qt Creator 's bug? If my program has scanf(), getchar() or some like them, It can't run!
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.
![alt text](/DATA_SSD/.linux/home/zzc/图片/2019-08-19 20-33-50屏幕截图.png)
However, if I delete the "getchar()", it can print "Hello World!"!
![alt text](/DATA_SSD/.linux/home/zzc/图片/2019-08-19 20-37-17屏幕截图.png)
Similarly, if I use scanf() like getchar(), it also show that and can't go on!
Do anyone know how to sovle it?
(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.
(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.
@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!
@zzc2422 Thanks for reporting back.
So please mark this topic as SOLVED now.