0

enter image description here

i just started CS50 and i am in week 1 however when i type in CS50 IDE and save file as hello.c, it never gets compiled.i used update50 command to make sure i am updated and checked the directory but i also have the same error
why is this error happening ??

1

This will happen if you accidentally saved the file name as "hello.c " (with a space following the c).

First, the icon for hello.c in the file tree shows as a text file. It should show as a C file like this:

enter image description here

Second, there is no C syntax highlighting in the hello.c window.

Suggest you File > Save As hello.c (be careful to type it exactly). You should then see two "hello.c" files in the file tree.

enter image description here

Right-click -> delete the hello.c that shows with the text icon. It will ask a confirmation message, and close the open editor pane. Double click on hello.c (with the C icon). It will open in the editor window, and now you should be able to compile.

1
  • Thanks it worked :) :) – Mostafa Said Mar 22 '17 at 14:47
0

enter image description here

I've definitely written it correctly but I'm having issues as well. Could you help out here?

2
  • same problem Im having – vedansh Jul 30 '20 at 23:31
  • did anyone figure this one out? i'm stuck:( – Alaina Rain Aug 24 '20 at 2:27
0

I'm having the same problem, but the file is saved correctly. I'm still getting "no such files or directory". Any help?

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .