Question about char input
- by DomX23
This is what I'm trying to do...
char input[4];
cin >> input;
cout << "Input[0]: " << input[0] << "Input[1]: " << input[1] << "Input[2]: " << input[2] << "Input[3] " << input[3]<< "Input[4] " << input[4] <<endl;
However, when I enter "P F" I get an out of this: Input[0]:P Input[1]: Input[2]: Input[3] Input[4]
Why do I get that weird character instead of F?