"C + + Primer (fifth edition)"

Source: Internet
Author: User

# commonly used in ACM: To determine whether the entire read process is over. (p280)

 while (CIN >> word)     // read operation succeeded ...

This method is inefficient and is more efficient in this way: "ACM Notes" No.4 http://www.cnblogs.com/fengyubo/p/4769254.html

# <fstream> defines three types to support file IO (p283)

Ifstream Read

Ofstream Write

FStream Reading and writing

Fstream::open (s)    //  Open File Sfstream::close ()    // close File

# Q: Why does C + + not put the file type into a built-in initialization of an object-like Cin, cout, Cerr? Inspiration

A: Because there are only three standard IO streams--each corresponding to the file descriptor 0, 1, 2--, but the user may read and write at the same time the file is not necessarily only one copy.

# You can use a derived class object as its base class object. (p279)

# You can bind a pointer or reference to a base class on a derived class object. (p534)

"C + + Primer (fifth edition)"

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.