How to compile cpp program in command prompt in using Windows 10 operating system?? | SoloLearn: Learn to code for FREE!

0

How to compile cpp program in command prompt in using Windows 10 operating system??

c++

8/17/2016 5:12:46 PM

Nikita

1 Answer

New Answer

+4

First install minGW compiler. Just google it and download the latest version. it's free. Then write your code in notepad and save it with the .cpp extension. For example let's say you have your file saved in c:\test\file.cpp Then go to command prompt and do one of these ways: HARD WAY: type g++ c:\test\file.cpp -o c:\test\file.exe THE EASY WAY: First navigate to the file path using the CD comnand: cd c:\test Then just type in: make file REMEMBER do not put the extension .cpp in the file's name in this method.