I was watching this CS50 course on computer science and it asked me to add the CS50.h header file but it wasn’t available in my vs code as it wasn’t cloud based like the cs50 one was
I wasn’t really trying much but searching it up on Google led me nowhere
New contributor
ScrawnyBrat is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
7
I was able to get it working as follow:
- Download the CS50 library (https://github.com/cs50/libcs50/releases), extract it and open your terminal in this folder
- execute
sudo make install
in this folder - Than you can include the library in your code with
#include <cs50.h>
- When compiling the program add the
-lcs50
flag to link the library