Hi,
I'm new to C++. I'm having trouble detecting space bar as an input. I'm unfamiliar with using the char data type. I've tried using ASCII decimal numbers but only detects the '.' . And I'm unsure how to go about this without using string or anything advanced.
char canvas;
cin >> canvas;
while(canvas < 32 || canvas > 46 || (canvas > 32 && canvas < 46)){ //input check
cout << "Error: Canvas choice can only be 'space' or .\n";
cout << "Choose either . or space\n";
cin >> canvas;
}
if (canvas == 32){
}
else if (canvas == 46){
}
space bar = 32, . = 46