- Domain Operator: C + + supports access to global variables through domain operators, C is not supported (identify for redefinition)
- Efficiency analysis of ++i and i++:
- Built-in type, no difference
- Custom data types, ++i can return references, i++ only return object values (copy cost)
- Floating-point numbers and 0 judgments
- if (x >=-epsinon | | x <= epsinon)
- The
- does not borrow the swap implementation of the intermediate variable.
- C and C + + differences
- C implements the process Control and other functions in C + +.
- The C part of C + + introduces overloads, inline functions, and exception handling. C + + includes object-oriented design content such as classes, inheritance, encapsulation, virtual functions, templates, package container classes, and so on.
- Note: C + + has object-oriented features, but is not really object-oriented (Java).
- extern "C"
- Use variables and functions declared within the C library. Only the header files are needed during the compile phase, and the matching definitions are found when linking.
- Explains that internal variables or functions are compiled and linked according to the C standard to solve the name matching problem.
Basic program of C/C + + (I.)