Recently learn C + + watching video, the teacher often mention stack area heap area, do not know, can only tear eyes, after all loved ... Therefore, the next step to do some sorting, easy to review. (The teacher said: This simplified model is for
Using the String class in C + +, there is no limit to the length of the array compared to using the array, and the operation is convenient for adding#include #include using namespace std;string jiami ( STRINGSTR,INTK,INTB); String jiemi
Templates are the basis for generic programming . The so-called generic programming is to write type-independent logic code, is a way to reuse. Templates are divided into template functions and template classes.First, we do not use the template
1. There are three sequential containers in the sequential container C + + standard library: vector list deque vector: Supports fast random access, inserting or deleting elements in locations other than the tail may be slow list: Supports fast
Personally think the second kind is more practical, but also the most commonly used ~However, when the calculation algorithm time-consuming, do not forget second, not as long as the milliseconds to reduce, otherwise negative, if the algorithm time
1. Q: Why can't I perform arithmetic operations on void * pointers?A: Because the compiler does not know the size of the value object, the algorithm operation of the pointer is always based on the size of the object being referred to.2. Can the Q:c
First, the summary: Variable size array. Supports fast random access. Inserting or deleting elements at a location other than the tail may be slow.: double-ended queue. Supports fast random access. Insertion/Deletion is fast at the beginning and the
Operator overloadingHow to use:To define overloaded operators in the declaration of a classDataType operator operator (datatype);Definition: datatype classname:: operator operator (datatype){}Limitations of overloaded operators:At least one operand
Procedural programming and object-oriented programmingObject-oriented Programming (OOP) Features:
Abstract
Encapsulation and data hiding
Polymorphic
Inherited
Reusability of code
Abstractions and classesA class is a C + + tool
Read CatalogueOne: Duplicate code Two: Eliminate duplicate code by delegating func in C #One: Duplicate code1 Public classpersion2 {3 Public stringName {Get;Set; }4 Public intAge {Get;Set; }5 6 Publicpersion
1.1. Basic concept of WEB serviceWeb service, also known as XML Web service WebService, is a lightweight, independent communication technology that can receive requests passed from the Internet or other systems on the intranet. is: Software services
Save the object in a file (in the form of a binary file):IFormatter formatter = new BinaryFormatter (); Stream stream = new FileStream (@ "D:\MyObj.bin", FileMode.OpenOrCreate, FileAccess.Write, Fileshare.none); MYOBJ MYOBJ = new MYOBJ ();//to do:
can use chmod to change the permission of a filechmod a+r myfile:a means add,r means readWriteFwriteHttp://www.tutorialspoint.com/c_standard_library/c_function_fwrite.htmsize_t fwrite (const void *ptr, size_t size, size_t nmemb, FILE *stream) writes
Atitit. Basic Sentence Pattern of programming language and Comparison of Chinese and English, atitit Chinese
Atitit. Basic Sentence Pattern of programming language and Comparison of Chinese and English
1. Common sentence patterns in programming
LeetCode Largest Rectangle in HistogramLargest Rectangle in Histogram
Original question
Given a bar chart, find the maximum area of the rectangle that it can contain. For example, the shadow part is the required rectangle.
Note:The width of all
Analysis of 2015 Class C ++ 2nd weekly practice projects
Project 1-declaring "Sovereignty "]You are already a CSDN blogger. Compile a program in an IT-specific way, output what you want to say on the screen, and publish a blog post as
Poj 1990 MooFest (tree array code)MooFest
Time Limit:1000 MS
Memory Limit:30000 K
Total Submissions:6265
Accepted:2765
DescriptionEvery year, Farmer John's N (1
Each cow I has an associated "hearing"
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.