Where to access the cs50/pset1/ directory

cs50

#1

Hello everybody, I’m in cs50 in the mario test, and don’t know where to access the cs50/pset1/ directory where i can find all the programs in order to compare what I did with cs50

even inside the terminal i tried opening the directory (which I managed using cd) and try opening the mario with the command: open mario.c or open mario, but couldn’t manage to open the c file.

Any suggestions please? thanks


#2

Hi! You may be looking for the cs50 home directory. You can access it in the following way:

cd ~cs50/pset1

The tilde (~) is important in this case (it’s a shortcut that tells the system that you want the cs50 home directory). By default, I believe CS50 does not provide the source code, so I would not expect mario.c to be present there. However, you should be able to run the staff-provided solution to compare its output to the output of your own code. You can run it in the following way (note that you don’t need open or any other commands):

~cs50/pset1/mario

By the way, this community is geared towards the Cloud9 IDE itself. We’re happy to help, but you can probably get faster responses to questions about CS50’s curriculum specifically by the various avenues CS50 provides for help, like their /r/cs50 subreddit or the CS50 Stack Exchange!