0

I'm wondering: Where are the header files - such as stdio.h or cs50.h - located: the ones that we include at the start of almost every source file?

3 Answers 3

0

If you are using the CS50 Appliance and have signed into the default user of jharvard, you will find them in /usr/include

3

First of all, these are not the libraries! These are known as libraries' header files (aka declaration files). You may have a look at this answer to learn a little bit more about them!

The header files for the C standard library are located in the default include directory. You may reach this directory by opening up the terminal and executing the following commands

cd /usr/include ls 

There you can see the header files for the C standard library. If you want to view one of these header files (e.g., stdio.h) on gedit, you may execute this command while you're in /usr/include/

gedit stdio.h 

The cs50 library's header file (i.e., cs50.h) that contains the resources of the cs50 library that are available for you to use exists in the same directory (i.e., /usr/include). You may view it on gedit by executing the following command while you're in the default include directory

gedit cs50.h 
0

Inside /usr/local/include and /usr/local/lib

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.