The C++ programming language is a set of instructions that tells the compiler how to perform specific tasks. These instructions consist of functions and statements, which, when compiled and executed, tell the computer what action to perform.
PrerequisiteTo compile and execute the program following prerequisites need to be met.
Here are the following instructions to compile and run the program.
Step 1: Open a Terminal or Command PromptIn this, you have to open the command line interface (CLI) of your operating system.
For Windows: Use Command Prompt (type cmd in the search bar) or PowerShell
For Mac\Linux: Open Terminal app
Step 2: Change the Directory to Where Your C++ File is StoredFor this, you need to write a command. Here, cd stands for "change directory".
For Windows Command Prompt (CMD) and PowerShell:
cd C:\Users\<yourUsername>\Documents</yourusername>
For Linux/Mac (Terminal):
cd /home/<YourUsername>/Documents
For example, if your file is saved in C:/Users/Dell/Documents, then you will type
cd C:/Users/Dell/DocumentsStep 3: Compile Your C++ Source Code
Assume you have a C++ file saved a Myfile.cpp; therefore, you will write the following command next. This command is the same for all Windows, Linux, and Mac.
$ g++ -o my_program Myfile.cppStep 4: Run the Program
Finally, just run the given program using the command. Here, ./ means the current directory.
$ ./my_program
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4