0

Can anyone help me to include cs50.h in VS code. I have windows but there is no option for Windows. I have searched so much but couldn't find anything. Can anyone please guide me from zero to install or setup cs50.h in my windows. please help me.

I want to include cs50.h in my c files.

5
  • 1
    SImple way. Put cs50.h and cs50.c in the same directory as the rest of your source code. Use #include "cs50.h" where you need it and add cs50.c to your build command like gcc mycode.c cs50.c -o myprogram.exe How you change the compile command will vary depending on which plugin you are using to compile your code. Commented May 12 at 17:40
  • how can i use it with 'make' command and run check50 and submit50 Commented May 14 at 12:58
  • i have placed cs50.h and cs50.c in both 1 - c folder and world sub folder but it still shows error PS F:\Downloadf\cs50\1 - C\world> gcc hello.c cs50.c -o hello.exe hello.c:2:10: fatal error: cs50.h: No such file or directory 2 | #include <cs50.h> | ^~~~~~~~ compilation terminated. Commented May 14 at 13:09
  • Okay. I said put it in the same folder with the rest of your source code and use #include "cs50.h", not #include <cs50.h>. Commented May 14 at 17:29
  • If you want the full environment locally you can use docker as explained here: cs50.readthedocs.io/cs50.dev Commented May 14 at 18:00

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.