Const thinking
1. What is const?A common type is a type described by the Type modifier Const. The values of variables or objects of a common type cannot be updated. (Of course, we can steal the bar for updating :)
2. Why is const introduced?The
1. What is const?
A common type is a type described by the Type modifier Const. a variable or object Value of a common type cannot be updated.
. (Of course, we can steal the bar for updating :)
2. Why is const introduced?
The initial purpose
1. What is a const?Const means a constant type, a const-modified variable or object cannot be modified and updated, and of course, in some cases, we can change it rescue.2. Why should I introduce a const?The original purpose was to replace the
1. What is const?
A common type is a type described by the Type modifier Const. The values of variables or objects of a common type cannot be updated. (Of course, we can steal the bar for updating :)
2. Why is const introduced?
The initial purpose
Http://blog.sina.com.cn/s/blog_6571c3dd0100kx6s.html
1. What is const?A common type is a type described by the Type modifier Const. The values of variables or objects of a common type cannot be updated.2. Why is const introduced?The initial
Article turned from: http://www.cnblogs.com/daocaoren/archive/2011/07/14/2106278.html1. What is a const?A constant type is a type that uses the const description of a type modifier, and the value of a variable or object of a constant type cannot be
1. What is a const?A constant type is a type that uses the const description of a type modifier, and the value of a variable or object of a constant type cannot be updated. (Of course, we can rescue to update:)2. Why is const introduced? The initial
I. About General constantsthe format of the declaration or definition is as follows:Const = ; [1] Const = ; [2]The definition of [1] and [2] is completely equivalent. For example:shaping Int (or other built-in type: Float,double,char)const int
1. What is const?A common type is a type described by the Type modifier Const. The values of variables or objects of a common type cannot be updated. (Of course, we can steal the bar for updating :)
2. Why is const introduced?The initial purpose of
Const Type Definition: indicates that the value of a variable or object cannot be updated. The purpose of this definition is to replace the precompiled command.
×××××× Constant must be initialized.
Role of const
A can define const constants,
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.