How to Compile and Run a C++ Program from Command Prompt in Windows 10 @LearningLad
How to Compile and Run a C++ Program from Command Prompt in Windows 10  @LearningLad
Uploaded February 2021 | Updated September 2026, 1 week ago
in this video tutorial, you will learn How to compile/ build and run a C++ language Program in command prompt on windows 10 operating System.

After installing C++ toolset ( mingw oin windows is used here ) we need to set the path environment variable.

After that we need to open the command prompt and use the command
g++ program.c
this will generate the executable from the program.

we can use a.out and run the program.

We can also give name for the executable generated by using
g++ -o program.exe program.c

Our Website
LearningLad.com

Social Media
Facebook facebook.com/LearningLad
Twitter twitter.com/LearningLadEdu
Instagram instagram.com/LearningLadOfficial
How to Compile and Run a C++ Program from Command Prompt in Windows 10Simple Trick to Open up Command Prompt ( cmd ) in a Folder with current location as Path Windows 10Displaying float double long double values in Scientific Notation in C Programming LanguageHow to Set up Visual Studio Code for Python ProgrammingHow to Add Two Numbers in Python | Simple User Input Program TutorialC Calculator Program Using Do While Loop & Switch Statement | Beginner TutorialSize Modifiers in C Programming | Short, Long & Unsigned Integers ExplainedHow to Install Python on Windows 11 (Latest Version) | Step-by-Step Guide for BeginnersWhat is a Structures | How to define Structures | C Language TutorialHow to Install C C++ Compiler / Tool set  ( gcc g++ gdb Mingw w64 ) Easily in Windows 11 ComputerDefining Structures Variables in Different ways in C Programming Language | TutorialSquare Pattern Printing with Diagonals in C Programming Language Tutorial
LearningLad |

How to Compile and Run a C++ Program from Command Prompt in Windows 10

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER