1

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?

Cheers!

  • What did you include? – Kareem Mar 19 '15 at 18:05
7

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>
| improve this answer | |
  • Thank you! I vaguely remember that header now, but can't recall where it was mentioned in the class. All is well now. – Bradley Stone Mar 20 '15 at 3:07
  • @BradleyStone man toupper in the terminal! ;) – Kareem Mar 20 '15 at 4:08
  • Thanks for that, the manual command slipped my mind. – Bradley Stone Mar 20 '15 at 5:05

You must log in to answer this question.

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