Reputation: 11
I'm trying to do a simple scan line code in CLion:
while((c=getchar())!=EOF) {
char_count++;
}
. I learned in class to type Ctrl-D to do a manual EOF, but this doesn't work in CLion. I've looked at previous questions about the same topic, and the command is enabled in the preferences. Any solutions?
Upvotes: 1
Views: 1195
Reputation: 51
It's a bug in clion, you can run your code in the terminal.
Like this:
first: gcc xxx.c
(it will create a file named a.out)
second: ./a.out
(code will run)
third: the terminal will receive your EOF signal
My point of view:
It is just a problem in IDE...the code is fine, thinks
Upvotes: 0
Reputation: 13
There is actually a long-known issue about this. Have you tried disabling the option run.processes.with.pty in Registry (Find Action > Registry)?
Upvotes: 0