Mastery 1 consisted of proving that on could create C++ files and run from a command line. I did this following this steps:

1. Start the code in any coding software, I used Atom that can easily be installed after downloading the package from the Atom page on Internet. The code I created was a “Hello World” code: https://github.com/CarlosGallegosT/Codes007/blob/master/Hello%20World 

2. After finishing the code, I saved it as a .cpp so it could be recognized as a C++ file and it colored the commands so each funtion would be recognized.

3. Afterwards, it must be run in a Terminal, I used Cygwin which I installed with the aid of this video: https://www.youtube.com/watch?v=i2h_976SpV0.

4. In order to run it on Windows, one must change the Directory to which Cygwin refers, that is done by used the command cd /cygdrive/c/Users (Your Username and the reference to the location of the file, which could be Documents or Desktop).

5. You should probably check if the file is found on that directory, this is done by typing the command ls that shows exing files on the directory.

5. Furthermore, the file should be compiled by typing c++ (Name of the file).cpp, if it does compiles, no issues should be reported. If a mistake in coding is detected, the file won’t compile and errors will be shown.

6. After successfully compiling, an .exe file is created, which can be confirmed by typing ls. In order to run the program, type ./a.exe to execute and obtain expected output.

7. In order to avoid typing commands all over again after closing the window, you may use the command history, to see previous inputs and select the one you wish to copy by moving with the arrows. 

Here’s an example, with certain features highlighted:

Thanks for reading, I hope this post helps you start programming in C++.

CC BY 4.0 My first Mastery #Mastery1 by Carlos Gallegos is licensed under a Creative Commons Attribution 4.0 International License.