So, I'm trying to make a work-around on a particular problem I'm having, but in order to do so I will need to have the program be able to read user-inputted chars as their ASCII values.
E.g. the char '0' (zero) as its ASCII value, which is 48.
Confused on what kind of input the user gives. Does the use input just one char and you treat it as the ASCII value, like 'A' == 65? or do they enter a number like 65 and you treat it as 'A'?
The user is to enter a series of character variables, such as "2+3", which is then to be stored on a C-string such as char equationStore[50];
Then, the program must compare the inputted characters to preset values one-by-one.
In other words, the user is to enter characters. And the program, in order to process it, must first change these inputted characters into their ASCII value counterparts before processing them, one-by-one - it goes like :
*User inputs series of characters
*Series of characters stored as C-string / character array using cin.getline
*Array element 0 accessed
*Content of char array element 0 converted to corresponding ASCII value
*Converted ASCII value compared to integers to find out whether its a digit, a character, whitespace, or punctuation
*Depending on what type it turns out to be, outputs a sentence saying "Item 0 is a [type]"
*Process is repeated for each array element until NULL (end of user input) is reached
*Program ends