Template FunctionsThe declaration and definition of the c ++ template class/template function should be put in the header file. Do not separate the Declaration and definition of the function in the class (for example, in. declare a member function in the H file. define the member function in the CPP file). This will cause a connection error. The template class/Template Function Definition and declaration should be written in a. h file. STL sortingOne type. To support calling STL sort for sorting, operator <and value assignment should be implemented. Read string (including space)If the fgets input contains a linefeed gets, for example, if the input is Hello + press ENTER fgets: "Hello \ n" gets: "Hello" Pointer SubtractionThe pointer minus pointer is equal to the number of elements between two pointers. For example, the value of int p [10] p + 10-p is 10.
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