Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The usage of mian function in C++ Foundation

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article for everyone to show the c++ basis of the use of mian function, concise and easy to understand, absolutely can make your eyes shine, through the detailed introduction of this article I hope you can gain something.

1. Start with the main function

int main()

{

return 0;

}

The operating system executes the program by calling the main function, which executes the statements that compose itself and returns a value. A return of 0 indicates that the program has completed successfully. (Non-zero return values have operating system-defined meanings)

2. input and output

Input and output functionality (IO) is provided by the standard library, and the iostream library is based on two types named istream and ostream.

Standard input (istream) cin

standard output (ostream) cout cerr (standard error) log (general information)

#include //preprocessing hints (using iostream library)

int main()

{

std::cout > v2; //std is namespace

:: Yes Scope Operator>> Yes Input Operator

std::cout

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report