cs50 / libcs50

This is CS50's Library for C.
https://cs50.readthedocs.io/libraries/cs50/c/
GNU General Public License v3.0
1.79k stars 861 forks source link

Include errors detect , cannot open source file "cs50.h" #328

Open Foz1984 opened 6 months ago

Foz1984 commented 6 months ago

while I am writing code #include , it gives error "Include errors detect , cannot open source file "cs50.h".

Landixbtw commented 6 months ago

are you on your local ide ? If yes, are you using windows, macos linux ? (next time, please ask on one of the other online communities )

nandarwin19 commented 6 months ago

while I am writing code #include , it gives error "Include errors detect , cannot open source file "cs50.h".

I guess it might be helpful for you https://www.youtube.com/watch?v=ad0HHLldK-c

afifafifafifafifali commented 4 months ago

Are you logged in as root? Because it causes problems when logged in as root because the 'root' user isn't told to that the "cs50.h" is a built-in library. You may download the source code of cs50 and put the files "cs50.h" and "cs50.c" to a directory on your workspace . To include it , type :

#include "yourdir/cs50.h"
//Note: #include <example.h> means built-in header ,  and #include "example.h" means user-written directory.
afifafifafifafifali commented 4 months ago

Question is, how do I know everything of this. Answer: I'm a Operating System developer . It is a hard project and includes the least used things in the C programming language . E.g. Writing your own standard header files.