Notepad has built-in support for up to 27 types of syntax highlighting (including various common source codes and scripts. It is worth mentioning that it perfectly supports .nfo file viewing), and also supports Custom language. Below we will introduce you to notepad and how to use Yuxing C language program.
Recommended tutorial: C language introductory learning video tutorial
1. First, you need to set up the MinGW compilation environment on your computer , MinGW download address: Link: https://pan.baidu.com/s/1LIBhqIs3EeiYjV9fl7pWwA
Extraction code: wtty
Download and install. After the installation is completed, you need to add the bin environment to the Path. Variables, I won’t go into the specific installation steps. It should be noted here that MinGW must be installed on the C drive to avoid unnecessary errors in the future.
2. After the compilation environment is set up, open NotePad, create a .c file and write a piece of C language code
3. After finishing writing, click the menu bar--"Run--"Run, enter the compilation command in the pop-up box: cmd /k gcc -o "$(CURRENT_DIRECTORY)\$(NAME_PART).exe" " $(FULL_CURRENT_PATH)" & pause & exit
After selecting the shortcut key, save it as: gcc compile, pay attention to the shortcut keys not to be repeated, click Run in the pop-up box, Ok.
4. Next, click the menu bar--"Run--"Run, enter in the pop-up box:
cmd /k "$(CURRENT_DIRECTORY)\$(NAME_PART).exe"
Similarly, save the name and change it to: gcc run, then click Run and the program will be executed.
The above is the detailed content of How to run C language in notepad. For more information, please follow other related articles on the PHP Chinese website!