C + + for some time, today suddenly to overload an operator, found himself a little forgotten, and then check the data to do a little summary of C + + operator overloading.One, what is operator overloadingThe overloads of the operators are specific
Today in a video learning C language operators, the video mentions assignment operations, relational operations, logical operations, trinocular operations, and the priority relationship between them. In order to satisfy my thirst for knowledge, I
Priority level
Operator
Describe
Example
Binding nature
1
() [] -> . :: + + --
Array subscript access operator operator that accesses a member through a pointer to an object operator that accesses
Reference:Https://www.cnblogs.com/dengdan890730/p/6145585.htmlhttps://blog.csdn.net/touch_dream/article/details/62447801https://blog.csdn.net/xiahn1a/article/details/42141429https://blog.csdn.net/swj110119/article/details/51777422 what is the edge.
SqliteoperatorWhat is the SQLite operator?An operator is a reserved word or character that is primarily used in the WHERE clause of an SQLite statement, such as comparison and arithmetic operations.Operator is used to specify conditions in the
Operator _ and _ operator priority, operator priority
Mathematical operators (7 ):
+,-, *,/, %, ++, And ,--
1 · % is the remainder operator, for example: 3% 2 = 1 8% 3 = 2
2. ++ and -- are the auto-increment 1 and auto-increment 1 operators.
3. I ++
Priority level
Operator
Name or meaning
Use form
Combination direction
Description
1
[]
Array subscript
array name [constant expression]
Left to right
()
Parentheses
Overload operator parsing (original)
Overloaded operators are a good young man, but to spit it out, we often write many repetitive code for overloaded operators. It's boring, but it's also necessary. The more you overload, the greater the
Every operator overload that we use in C #, gets converted to a function call in IL. TheOverloaded > operator translates into the function op_GreaterThan and a + gets convertedto op_addition etc. In the first program of this chapter, we have
Prefix and suffix of the auto-increment and auto-increment operators, and suffix of the operator prefix.
There is such a question in the exam:
12
inta = 4;(++a) += i;
Evaluate the value of a. The correct answer is 10.
If you think
Operators are special symbols or phrases that check, change, merge values,Swift supports most of the standard C-language operators and improves many features to reduce general coding errors./*Such as: the assignment (=) does not return a value to
Priority level
Operator
Name or meaning
Use form
Combination direction
Description
1
[]
Array subscript
array name [constant expression]
Left to right
()
Front.
Most of the operators in JavaScript are represented by punctuation marks, and a few are represented by keywords, and their syntax is concise and their numbers are indeed quite large. Operators always follow some fixed syntax, and only if you
Operator overloading is essentially an overload of a function
The functions of overloaded operators are generally formatted as follows:
function type operator operator name (parameter list column)
{Overloaded handling of operators}
For example,
C + + Flow insert operator ">" is C + + in the class library provided, all C + + compiler system in the class library provides input stream class IStream and output stream class Ostream. CIN and cout are objects of the IStream class and the Ostream
Absrtact: In C language teaching, the self-increment self-subtraction operator is widely used, and it has certain skill and difficulty. Among the many operators, the self-increment decrement operator is the most difficult to understand and the most
Assignment operator
The assignment symbol "=" is the assignment operator, which is to assign a data to a variable. The function of "a=3" is to perform an assignment operation (or assignment operation). Assign the constant 3 to variable a. You can
One of the most basic uses of computers is to perform mathematical operations, and as a computer language, Java also provides a rich set of operators to manipulate variables. We can divide the operators into the following groups:
Arithmetic
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.