The first chapter, the first knowledge of C + + language, the establishment of a C + + program--hello,world

Source: Internet
Author: User

First open visual c++6.0, run C + +

Choose the file>new menu command, select Files in the popup window

Select C++source file from files, enter the source program name on the right Hello,world select the location where the file is saved, click Confirm

Enter code in the edit window

#include <iostream.h>
void Main ()
{
cout<< "hello,world!" <<endl;
}

Then compile the code

Build a Running Program

Then I want to output "I want to learn the C + + language, as long as the persistence of victory", what should be done?

#include <iostream.h>
void Main ()
{
cout<< "I want to learn the C + + language, as long as the persistence of victory" <<endl;
}

Compile the build to execute it.

This chapter summarizes: cout is a system-defined output stream that has only one statement cout<< "hello,world!" <<endl;, for output Hello world.

<< is the insertion operation symbol Endl the action of line wrapping.

The first chapter, the first knowledge of C + + language, the establishment of a C + + program--hello,world

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.