Has this question something to do with the logical error I spotted for you at the previous post?
Type: Posts; User: std10093
Has this question something to do with the logical error I spotted for you at the previous post?
Always post your code in code tags. I can not even copy paste.
You are doing this
if(((j=strcmp(..))) ==0)
{..
Ok so you are calling strcmp and you assign the result to j. Then you...
Probably yes. But I like your approach more ;)
Yes. Start the enum's first letter (A) with the corresponding ASCII value... that way you will get all the letters the correct ASCII value. Then read normally from input and just compare like this
...
Well when I need a quick zipped reminder on enums I take a look here. Of course, if you google you can find more. You can always ask if needed.
PS - Παρακαλώ :)
Oh Andreas good thing you pointed that out! I wanted to write "if you are not interested in using a function. Thanks.
Or you could use enums if you are interested in a function.