I am currently working on pset2 in CS50 and am having trouble with initials.c

The compiler does not recognise 'toupper', and I use '#include ' at the top. I just updated everything, so this seems to be a strange bug indeed.

What could be the problem and potential solution?


  • What did you include?
    – kzidane
    Mar 19, 2015 at 18:05

1 Answer 1


I really think that is because you didn't include the correct header file, toupper() is a function declared in ctype.h you need to include this header in the code.

#include <ctype.h>
  • Thank you! I vaguely remember that header now, but can't recall where it was mentioned in the class. All is well now. Mar 20, 2015 at 3:07
  • @BradleyStone man toupper in the terminal! ;)
    – kzidane
    Mar 20, 2015 at 4:08
  • Thanks for that, the manual command slipped my mind. Mar 20, 2015 at 5:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .