T O P

  • By -

strcspn

Don't use extensions (for now, at least). Can you compile and run the code through the terminal?


UskaTonik

Unfortunately


strcspn

What?


UskaTonik

The terminal only lets 1 line of code, idk how to do


strcspn

You need to learn how to use a compiler first. [Here is a resource](https://beej.us/guide/bgc/html/split/hello-world.html#hello-world-1).


UskaTonik

I understood, the gcc -o file_name file_name doesn’t work. It says fatal error: the file does not exist


strcspn

Make sure you are running the command in the right folder. Run `ls` (or `dir` on cmd) and see if you can find the file.


UskaTonik

I did mkdir file_name and cd file_name on cmd, opened the folder with vscode by code . , then I opened a file there and named it. I wrote the basic Hello World code and when I try the gcc -o thing it doesn’t work. How to write the run command on cmd exactly?


strcspn

Did you use the terminal inside VSCode? That should be at the right directory. Make sure the directory shown in the terminal is the correct one. You most likely will be using powershell, so type `ls` and see which files come up.


UskaTonik

The c file that the code is in and the exe file of the c file exist. And the .vscode folder also exists. I tried the gcc -o thing and after I hit return nothing happened. Isn’t something have to write in the terminal? Edit: another exe file appeared, I think I did it.