且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

C ++中+ =和= +之间的区别

更新时间:2023-12-04 11:01:04

=+确实是= +(赋值和一元+运算符).

=+ is really = + (assignment and the unary + operators).

为了帮助您记住+=,请记住它先进行加法运算,然后进行赋值运算.当然,这取决于实际的实现,但是应该用于原语.

In order to help you remember +=, remember that it does addition first, then assignment. Of course that depends on the actual implementation, but it should be for the primitives.