To run the code in the command line interface in Linux (Ubuntu, Debian etc.)
Step 1: Create your file by using: nano HelloWorld.cpp
Step 2: Compile the executable by using: g++ HelloWorld.cpp -o Program
- Program is a name you can decide.
Step 3: Run the code by using: ./Program
To run the code in Windows 7-10
Step 1: Download Visual Studio Step 2: Download the C++ environment. Step 3: Create a project/solution and place the code inside. Step 4: Build the program and go to the directory that it's in. Default is /source/repos. Step 5: Run the .exe file.
To run the code in macOS (Any macOS Version)
Step 1: Create the file using make Program.cpp
- Program is a name you can rename. Make sure it is readable ONLY in C++!
Step 2: Run the code by using ./Program
- Program can be used as a different name.
© Microsoft Corporation 2018. All rights reserved.