Difference in terminals in reading inputs from keyboard in C
Posted: Sun Nov 27, 2016 8:39 pm
I am not sure this is a codelite-related question, but I think it is..
Why does this C code work in the native mac Terminal and does not work in the Codelite built-in terminal?
To make it work in the built-in codelite terminal I have to provide the two inputs separating them by a space (i.e. "4 2") instead of typing "Enter" between the two.
In the native Mac Terminal it works as expected. I am on macOS Sierra and I am using Codelite 9.2.7.
Why does this C code work in the native mac Terminal and does not work in the Codelite built-in terminal?
Code: Select all
#include <stdio.h>
int main()
{
int a, b;
scanf("%d%d", &a, &b);
}
In the native Mac Terminal it works as expected. I am on macOS Sierra and I am using Codelite 9.2.7.