(Post READING) C ++ primer (Fourth Edition) Chapter 3 Quick Start standard library type

Source: Internet
Author: User
Abstract types are called abstract types because we do not need to care about how they are expressed during use. We only need to know which operations are supported by these abstract types. The string type is not the same as the string type of the standard library.

Cin> S. If you enter Hello world, only hello will be saved to S, because the standard input will read the string until a blank character is encountered again.

Cout <"Hello World", the entire string is output.

Vector is a container, not a data type, and vector <int> is a data type.

The iterator is a pointer. Vector <int>: iterator iter = ivec. begin (); ITER ++ moves to the next element. The reason that ITER knows to move several bytes is that the vector <int> type already tells ITER that an element occupies 4 bytes.

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.