Input works differently when I include stdbool header file in C++


Check this simple C++ program that fills the array and then prints it.

When I run normally, the input is taken one after another when I press enter each time.

When I include <stdbool.h> header file and I didn’t even use it. This gave me additional feature. I can provide entire input at once in a single line. I observed this only works with char array. Someone explain ?

”’

#include<iostream> 
#include<stdbool.h>
using namespace std;


int main(){
    char arr(3)(3);
    
    for(int i = 0; i < 3 ; i++){
        for( int j = 0; j < 3 ; j++){
            cin>> arr(i)(j);
        }
    }
    
        for(int i = 0; i < 3 ; i++){
        for( int j = 0; j < 3 ; j++){
            cout << arr(i)(j)<<endl;
        }
    }
    return 0;
}

”’