-
It's not interesting, it's just that there's these members and methods in this category.
-
<< = Left shift assignment operator, |= Bitwise or assignment operator.
Variable << = Expression Shifting left is will.
The binary of the number on the left is all shifted to the left by a few bits, and the number on the right specifies the number of moving digits, the high position is discarded, and the low position is made up to 0, and moving a few digits is equivalent to multiplying 2 by several times.
C operator:
Add a value. Subtract the assignment.
Multiplication assignment. Divide the assignment.
Remainder assignment.
Bitwise vs. Assignment.
Bitwise XOR assignment.
= Right shift assignment.
When the right operand is again an assignment expression, multiple assignment expressions are formed.
-
|a<<=b;It is a = a <, that is, a (replaced by binary) is shifted to the left by the b bit, e.g. 0x11<< 2 = 0x1100
That's 3<<2=12
a|=b is a=a|b
It's bits or operations.
For example 0x1010|0x1100 = 0x1110 Algorithm:
Corresponding to bit 1|1=1,1|0=1,0|1=1,0|0=0
-
> = greater than or equal to.
Less than or equal to.
Not equal.
-
+= is an operator inherited from c c++.
For the underlying variable type, += is the value on the left side of the variable "self-incrementing" to the right, and the following 2 3 lines are equivalent:
int i=1;
i += 5;
i = i + 5;
For non-base objects, += is supported as an operator for overloading, but the overloading of standard objects retains the original semantics, the same as the equivalent statement of the base object. However, there is no guarantee that all objects' += will mean this way, because operator overloading can redefine their meaning.
-
When used for variables, the value of the variable on the left is added to the value of the expression on the right, and then the value is assigned to the variable on the left.
When used for event registration, it is a notification system that executes the function on the right when an event on the left occurs.
-
Are you talking about C or C++ statements? If so, then I know that, for example, a+=b is the same as a=a+b, which is to assign the value of a+b to a.
-
int a=0;
a+=1;and a=a+1; These two are the same.
Some advanced applications are delegated with **, and sometimes this += operation is also used.
-
x+=1 means x=x+1, i.e. the value of x increases by 1
-
Let's take the simplest example.
int sum=0;
for (int i=1;i<=10:i++)consolewriteline(sum);
consolereadkey();
-
Value types allow data structures to be transformed implicitly or explicitly. It is also allowed in C to convert any type of data to an object, or any type of object to a value type that is compatible with it.
c The conversion of a value type to an object is called binning, and the conversion of an object to a compatible value type is called unboxing. This packing and unpacking operation is similar to sending and receiving postal parcels, packing and packing parcels before sending them, and unpacking and unpacking them after receiving them.
Binning means converting data of a value type into data of an object type, which is implicit.
The object class in c is the final base class for all classes, so a value type variable can be assigned directly to the object object.
For example, unboxing means converting an object to a value-type data, and the unboxing process must be explicit. Check the data types referenced by the object before and after unboxing, and then copy the data values. For example:
It's a shame to ask your question, one is the development environment, the other is the language, what's the difference, you're laughing to death.
1. Words about love are: friendship, love, dear, love, love, love, >>>More
The belt gradually widened and did not regret it, and it made people haggard for Yi. >>>More
If it's a hard disk version of ghost, just restore it directly. >>>More
Today, I waited early in front of the TV with excitement for the start of the "Military Parade to Commemorate the 70th Anniversary of the Victory in the Anti-Fascist War." The military parade is China's window to the world to show that we are committed to upholding the post-World War II international order. I don't know how long I've been looking forward to this day, because I have a great interest in the military parade, and I can't remember how many times I watched the military parade for the 60th anniversary of the founding of the People's Republic of China, but this time I finally had the opportunity to get up close and personal in front of the screen. >>>More