Transferred from: http://www.cnblogs.com/rocketfan/archive/2009/10/02/1577361.html
1. compilation unit: A. cc or. cpp file is used as a compilation unit to generate. O.
2. Definition and declaration of common data types, Function Definition and
Static and static keywords in C ++
Static means static. Here I want to systematically describe the role of the static keyword. Of course, it mainly describes the role of the static keyword in the development languages C and C ++. For other functions,
There are two ways to use static: process-orientedProgramStatic in design and static in object-oriented programming. The former applies to common variables andFunction, which does not involve classes. The latter mainly describes the role of static
Static
A static data type is used to create a permanent storage space for a variable. The statically variable keeps their values unchanged when invoked between functions. When used in a class, all the variables that are used in a static variable
1. The definition of static member data, as defined by statically typed variables, to add the keyword static before the definition of the member data.
2. Static member data must have a definite value, but because the member data cannot be
Static {} (static block) is executed only once when the class is loaded. It is generally used to initialize static variables and call static methods, next we will discuss in detail the features and applications of this statement block.1. During a
Static variables, static methods, static classes in JavaStatic variables and static methods are static objects, and it is necessary to explain the differences between them and non-static objects.(1) What is the difference between a Java static
create another class in one class, called the member inner class. This member inner class can be static (with the static keyword decorated), or it can be non-static. Since static internal classes are defined and used, there are various
1.static concept Static modifier, what is static modifier? As you know, any variable or code in the program is automatically allocated by the system at compile time to store the memory, and so-called static refers to the memory allocated after
Static is a common keyword in C + + that is used to control how variables are stored and visible.In a class definition, its members, including data members and member functions, can be declared as static members with the keyword static. The
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.