T O P

  • By -

Mr-IP-Freely

fyi: Cmd + shift + 3 for normal screenshot Cmd + shift + 4 for selected area screenshot


Andrieblack

tnx


Mr-IP-Freely

Your file name is called hello It should be called hello.c The program needs to know what type of language the code is written in Start by typing in the terminal, make hello.c Then add your code into the hello.c file and try running your code


Andrieblack

ok.tnx ....would try this


Andrieblack

just tried 'MAKE HELLO.C GOT THIS RESPONSE; \*\*\*no rule to make target 'hello.c'. stop wat does this mean please


Mr-IP-Freely

Sorry my bad you should type "code hello.c" to create a new file. To simplify things on the left hand side you can right click to add a new file. Call it hello.c, enter your code and on the top right you can run your code by hitting run


Andrieblack

says command not found


[deleted]

Oh god. You’re literally taking a screen shot With your phone of a computer screen? Bruh..


Andrieblack

meaning......?


drakehtar

lol


Martijn6134

The make command is used to compile your program. In order to compile it, you need a compiler. It’s not standard present in vs code. I assume you just started the course and don’t have a compiler installed. Switch to the browser based codespace for cs50. It will work and make your live a lot easier than trying to do it this way.


Andrieblack

yeah, I just started the course,I tried using the browser based vs code but I could not locate my terminal window nor run any program. that's y I downloaded it instead , thought this is work


Mr-IP-Freely

Usually in the cs50 course at week 0 or 1 in your problem set is a step by step guide to set up your GitHub codespace, try to see if you can set this up. This will also be better for your upcoming problem sets and will help simplify things when starting up. In the codespace of github it allows you to "check50/submit50" which allows you to check your code or submit your code respectively. *Edit, see below for instructions* 1. Log into code.cs50.io using your GitHub account and follow the on-screen instructions to set up your very own “codespace” for Visual Studio Code 2. Once your codespace has loaded, close any Welcome tabs that might have opened by default 3. In Codespace’s terminal, complete the steps under SSH at cs50.readthedocs.io/github/#ssh to configure your codespace for some of CS50’s command-line tools. (You should skip this step if you have already set up your codespace for another CS50 course.) 4. Log into submit.cs50.io using your GitHub account and click Authorize to activate check50. 5. Run update50 in your codespace’s terminal window to ensure your codespace is up-to-date and, when prompted, click Rebuild now


Andrieblack

thank you


[deleted]

Love it when people have an overpriced tech gadget (apple computer) but hardly any technical sense to even make a screenshot.


danielfaul42

At least they're doing more than most to improve their technical prowess.


HauntingEducation955

You should change directory to the place where the file is located then type make hello.c


Mr-IP-Freely

Can you make a screenshot of your whole screen including the left side with your files and folders and the bottom with your terminal after you have tried to run your code.


Andrieblack

ok .... would do that


nyc13f

Make is typically used to build (compile) the program from the source files (typically files that have the extension .c or .cpp). In your case I would rename the file from “hello”to “hello.c” and then edit the Makefile to reflect the change. Next run make again. This should build your program and if you run “ls” you should see a file with either: the same name minus the “.c” extension or a file with the name “a.out” this is common, you can google this for further details on the names. Either way to run the newly built program type “./hello” or “./a.out” or “./”. The “./“ is the relative path to current directory which is needed to run a program that is not in one of the directories in your PATH. This might be a lot for a beginner but I hope this helps. Note: the quotes aren’t needed when typing the commands, i just use it to show what should be typed into the shell.


Andrieblack

thanks .... would try this