C + + Learning Note--season 1

Source: Internet
Author: User

#include <iostream>  // pretreatment  Note: iostream does not take. hint  main ()    {"  AlohaWorld" << Std::endl;     return 0 ;}
#include <iostream>//pretreatment Note: iostream not with. h/*name Space-namespace*/using namespaceStd//once defined, the following program can be used directlyintMain () {cout<<"Aloha World"<< Endl;//You don't have to write Std::cout Std::endl here .    return 0;}//Summary: Not recommended for this purpose
#include <iostream>//pretreatment Note: iostream not with. h/*name Space-namespace*///using namespace std; //once defined, the following program can be used directlyusingstd::cout;usingStd::endl;intMain () {cout<<"Aloha World"<< Endl;//You don't have to write Std::cout Std::endl here .    return 0;}//Summary: This is not recommended, better than using namespace. It's a good idea to define namespaces individually .

1 Basic explanation : extern can be placed before a variable or function to indicate the definition of a variable or function in another file, prompting the compiler to find its definition in other modules when encountering this variable and function. Also extern can be used for link designation.

C + + Learning Note--season 1

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.