I have a simple piece of code that will echo whatever you type into the console:
int main(){
setvbuf(stdout, NULL, _IONBF, 0);
char c = -1;
while(scanf("%c", &c) == 1){
printf("%c", c);
}
}
But when I Debug this code in Eclipse CDT it outputs the following without me typing anything into the console.
47-thread-select 1
How can I disable this from being fed into the input stream? Also sometimes if I run this there are multiple lines being outputted so I cannot simply discard 1 line.