Home >Development Tools >notepad >How to run C language in notepad

How to run C language in notepad

angryTom
angryTomOriginal
2019-08-12 11:10:577425browse

How to run C language in notepad

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.

How to run C language in notepad

2. After the compilation environment is set up, open NotePad, create a .c file and write a piece of C language code

How to run C language in notepad

 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.

How to run C language in notepad

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.

How to run C language in notepad

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn