I am not enrolled, so I don't have access to the cs50 appliance. I have followed the instructions for installing the files for a mac. I've read numerous threads for the issue, and tried to implement the instructions in those threads. I did however notice that there wasn't an accepted answer. I tried to locate the dirs for stdio.h and ctype.h then drag and drop the cs50.h file to those dirs. there are multiple dirs for the standard files.

usr/include/c++/4.2.1/tr1/ctype.h and usr/include/ctype.h

there is a copy of cs50.h in both this dirs as well as the one created by command line inputs for installing the file


However I have been successful with #include "cs50.h" and placing a copy in the directory that contains my source code.

Has anyone had success with the previous "ideal" method?

  • If you put cs50.h under /usr/include, you should be able to include it using #include <cs50.h> not #include "cs50.h"
    – kzidane
    Mar 12, 2015 at 20:44
  • it's in all three of the directories I listed, declaring it local was the only way I have gotten anything containing cs50.h to compile. I've been using default c functions to complete the psets, but strings are a little beyond me. I'd really like to keep moving forward.
    – Frankiii
    Mar 13, 2015 at 0:29
  • I never dealt with Xcode before but I assume that this is an issue with the default paths where Xcode searches for your header files. There gotta be some way to configure them.
    – kzidane
    Mar 13, 2015 at 10:36
  • I didn't fix it, but I got around the issue. I placed a copy of cs50.h in the same directory as my source code, then pasted the functions I needed from cs50.c with a prototype. It's ugly but it works.
    – Frankiii
    Mar 14, 2015 at 5:05


You must log in to answer this question.

Browse other questions tagged .