1. Download MinGW Installer on MinGW website
2. Tick the required components in the installation screen, mark the right interface, select Apply change in the menu bar installation, wait for the installation
3. Environment configuration: In the environment variable path, add the MinGW Bin directory path to path.
4. Inspection
1) Create a new HELLOWORLD.C file under the C drive with the following source code:
#include <stdio.h>
Main () {
printf ("Hello world!\n");
return 0;
}
2) Compile.
C:\>gcc-o Helloworld.exe HELLOWORLD.C
3) run.
C:\>helloworld.exe
Hello world! This is my first C program!
1) Create a new Helloworld.cpp file under the C drive with the following source code:
#include <iostream>
Main () {
Std::cout << "Hello world! This is my first C + + program! "<< Std::endl;
return 0;
}
2) Compile.
c:\>g++-O helloworld.exe helloworld.cpp
3) run.
C:\>helloworld.exe
Hello world! This is my first C + + program!
Download and environment configuration for MinGW