Could someone explain the correct method for seeing if a char is equal to a certain letter/number, this method comes up with an error. I think the relevant lines would be 2, 12, 18 and 23.
Well, since you're using XCode, replace code == "A" with strncmp(code, 'A', 1). Should work. If not, I'll leave it to someone else who knows more on XCode than I do.