[Introduction to the C Language for Beginners of the Electronic Department] Dev-cpp installation and the first program

Posted May 27, 20203 min read

Hello! How are you guys( ) ! Here is the Electronics Department of the School Science Association, welcome to read our novice tutorial.

In this issue, we will take you to install Dev-cpp, a classic and simple C language development software.

First, we can obtain the software installation package from here . If the download is not normal, it is also provided in the attachment( Source directory ).

Then, think about it before you start-it is recommended that you build a few folders to classify the software before installing the software, such as creating a Software folder, and then build some folders such as Video and Program to install the software . If you are not sure about the division of the folder, you can draw a mind map. Xmind is recommended.

(Supplement:This tutorial is a cute new design without any foundation, please rest assured to read)

installation steps

  • First run our downloaded "······· Setup.exe" installation package(double-click or right-click to open anything), the following page will pop up and wait for it to load(just a few seconds)

DEV_cpp_1.png

  • Then there is the language selection interface. You will find that you can't find Chinese. It doesn't matter. Choose English first. Chinese will be there in a while.

DEV_cpp_2.png

  • Then, there is usually a step during software installation, agree to some terms of software use, nothing special, just select "I Agree".

DEV_cpp_3.png

  • The next step is to choose the installation directory. The example in the picture is actually not very good. The hierarchy of "Software-> Program-> Dev-cpp" is more recommended. Please add one more sentence. Please try to write code afterwards. Separate from the software ontology to avoid confusion. For example, you can create a folder called "Code \ _Bank", and then divide it by software or language, etc., to put the code.

  • After selecting, click "Install" to complete.

    Warning:Please do not have any Chinese and spaces in the software installation directory, it is best to use only English and underscore, otherwise the problems caused by the character encoding may cause the software to not work properly

DEV_cpp_4.png

  • Then wait for a while, about the time of pouring a glass of water.

DEV_cpp_5.png

  • Then an interface will pop up for language selection, now there is Chinese.

DEV_cpp_6.png

  • The next step is to choose the theme and choose the default one. Although it is not very good-looking, we will do some beautification in the next tutorial.

DEV_cpp_7.png

  • Then all the settings are over, OK.

DEV_cpp_8.png

  • Then you will come to the Dev-cpp user interface.

DEV_cpp_9.png

  • Hurry up and experience, first build a code file.

DEV_cpp_10.png

  • Knock out the classic "Hello World!" Program, and then choose a place to save it. Well, the first one is used to be called "Hello". You will understand it later(laughs).

    (Supplement:The default file suffix is .cpp, in fact this is a C ++ applicable file, but it is also fully compatible with the C language, so no need to change)

    The code can refer to this:(don't copy it)

      #include <stdio.h>
      int main()
      {
          printf("Hello World!");
          return 0;
      }

DEV_cpp_11.png

  • Click the location in the picture or press the shortcut key F11 to compile and run the program we wrote.

    (Supplement:If you press F11 to adjust the brightness and other system functions, please press Esc + Fn to switch the hotkey status, then the original function needs to be pressed by Fn + F11)

DEV_cpp_12.png

  • After running, a black box like this will pop up, which shows the content of our program "Hello World!" And some prompts. If you have successfully seen these, congratulations, although you may not realize it, but the door to the new world has been opened, brave boy/girl, are you ready to embark on a journey to explore Xinghai?

DEV_cpp_13.png

(Recommended to continue reading the related content of the beautifying Dev-cpp interface, the address is here )