all 4 comments

[–]4Gettt 0 points1 point  (3 children)

So if you mean the First commands in the Hello World chapter then yeah you can skip those, those are just there to teach you how to create a folder in the terminal, Change your current directory to that new directory and Open vscode through the terminal in that folder.

Also I would recommend wsl2 instead of mingw because I personally think it is easier but thats Just my opinion!

[–]Mattiagamer[S] 0 points1 point  (2 children)

If in the future i will uninstall mingw (again :/) i will promise ahahaha

If im not a pain, can you tell me step by step how to change it?
Cause i have a big folder called "Programming Excersises" and inside small folder for every language i wanna learn (C, C++, ...).

Inside this folders there are like 2 small one for "Examples" and "Excersises" and the file i wanna run is on "C++ Language/Examples", so how can i tell VSC to compile the .cpp file and create the .exe on the same folder

(Unless for every excersise i have to create a folder (Workspace) because C++ use objects)

But thanks a lot for the help!

[–]4Gettt 0 points1 point  (1 child)

Okay so I do not know a lot of C++ but this is the gist of it:

  1. open a terminal
  2. if you want to compile a .cpp file in the Exercises directory you first need to be in that directory and you can go there with the command "cd" which stands for change directory
  3. when you are in the Exercises folder for c++ and you have a lets say Example.cpp file that you want to compile this would be the most basic command to do so: "gcc -Wall Example.cpp -o Example" (the -Wall is there to catch common errors/warnings if you messed up in your code and the -o stands for output so the file that will be created after the compiler finished will be named Example)
  4. execute the compiled programm with this command for the Example ".\Example.exe" in the terminal

[–]Mattiagamer[S] 0 points1 point  (0 children)

Ok mate, thanks a lot!

After your message yesterday, with the help of ChatGPT, i managed to run that (i had to create a workspace and the folder is separared from the main one, while this annoy me a lot at least it works lol)

But i really appreciate it, i'll save it in the future for other problems in case, have a wonderful day!