C language How to run the first Hello World applet on the machine

Source: Internet
Author: User

First, open our Visual C + + 6.0 software, I use the Chinese version, the software main interface as shown in:

1. Then click on the file in the toolbar, there is a new menu, then we can set up our workspace, as shown in:

2. Then click OK in the step by default, complete, then the workspace is set up!

Two. Next, click on the file under the toolbar, there is a new menu, click on it, the dialog box appears:

1. Click OK to create a HELLOWORLD.C applet, and then we can write our Hello World applet.

2. The program code is as follows:

#include <stdio.h> void Main () {printf ("Hello World \ n");}

3. We need our VC + + 6.0来 Compile this program, compile error-free to run this program, compile the button and run the button such as the red Arrow:

4. Alternatively, you can click the Compile menu item under the Build toolbar, then click the Execute menu item, also have the shortcut key, press CTRL+F7 to compile the program, press CTRL+F5 to run the program.

5. Compile without errors, click on the Run button as shown below:

Three. Code parsing:

1. The first line of the # include <stdio.h>, this line of code is a compilation preprocessing directive, used to provide input and output functions of the Declaration and the definition of macros, the global volume of the definition of these information. Stdio.h is a file name that is provided by the system, STDIO is the abbreviation for standard input & output, meaning the normal input and output, the file suffix. h means header file, because these files are placed at the beginning of each file module of the program. In general, the information about the input and output functions has been placed in the stdio.h file beforehand, and is then transferred to use the # include directive.

2.void Main () {},main is the function name of the main function, which means that this is a main function, each C source program must have and only one main function.

3. Function call statement, called printf ("Hello World \ n"), the function of the printf function is to send the output to the display to display, that is, the printout of Hello world to the Windows console, where \ n is an escape character, Has the function of changing careers.

The 4.PRINTF function is a system-defined standard function that can be called directly in a program.

Four. The above content is only for everyone to study the reference, thanks!

VC + + 6.0 Chinese Green version: http://download.csdn.net/download/u012561176/9182983

C language How to run the first Hello World applet on the machine

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.