Eclipse 21-09 (Ubuntu) + CDT 10,4 GNU gdb (Ubuntu 9.2-0ubuntu1~20.04.1) 9.2 gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)
I Created a c/C++ project → C Managed Build → Executable (empty) (toolchain Linux Gcc) Created a small snipped of C code for scanf; Build and selected to debug
WHAT happen, is that -the debugger step into lines, when it arrives to the scanf the debug cursor disappear,.. seems to wait for an input.. -BUT if I move to de consolle tab, and enter some numbers and press nothing happens… -I’ve got to digit a second line and 2nd (?!?!) than the program seems to wake up.. If a set a scanf with multiple items, the things get even worst...
-WHAT can cause the problem in the Eclipse console?
-Which information/file can I give you to understand what’s preventing the scanf to return ?
#include <stdio.h>
#include <stdlib.h>
int main(void) {
char op;
int n1 = 0;
int n2 = 0;
int control;
control = scanf(" %d ", &n2);
printf("you enter %d\n", n2);
/*
control = scanf(" %c %d %d ", &op, &n1, &n2);
printf("You entered: char %c, num1 %d, num2 %d", op, n1, n2);
*/
}