The header file I encountered

Source: Internet
Author: User

Cctype is generally used to process single character such as characters (if the character is a space output true value otherwise false) character transformation (case change)

String is basically the type of strings that can be

An array template class can generate a fixed-length array usage array< type name, number of elements > array name; Example: array<int,4>score={56,98,78,86}

A vector is a container class like a variable-length array vector< type name > array name (length) if the not-written length means that no member Vector.size can return the container length that is initialized after initialization can still be arbitrarily added delete

Iomanip is a function that controls input and output, such as stew (5) output five spaces and control the number of significant digits, etc.

Malloc.h is a dynamic storage allocation function header file that calls the relevant function when an operation is made to an internal store

    • #include <malloc.h>= #include <alloc.h>
    • Note: If the assignment succeeds, it returns a pointer to the allocated memory, otherwise the null pointer is null.
    • Use the free () function to release memory blocks when memory is no longer in use.
    • Different points of malloc and new

         New Returns a pointer of the specified type, and can automatically calculate the desired size . For example:

      int *p;

      p = new int; The return type is the int* type (integer pointer), and the allocation size is sizeof (int);

      Or:

      Int* Parr;

      Parr = new int [100]; The return type is the int* type (integer pointer), and the allocation size is sizeof (int) * 100;

      malloc must be computed by us to calculate the number of bytes and then forcibly converted to a pointer of the actual type after the return .

      int* p;

      p = (int *) malloc (sizeof (int));

-

The header file I encountered

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.