473,407 Members | 2,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

+= plus equal sign

5
What does += mean?
Expand|Select|Wrap|Line Numbers
  1. int julian_day( int month, int day, int year )
  2. {
  3.   int jday = 0;
  4.   for (int m=1; m<month; ++m )
  5.     { 
  6.       jday += DaysInMonth[m];
  7.       if ( m == 2 && is_leap_year(year))
  8.           ++jday;  // February 29th
  9.     }
  10.   jday += day;
  11.   return jday;
  12. }
  13.  
Thanks a lot
Jul 28 '07 #1
2 70971
JosAH
11,448 Expert 8TB
+= is the 'add assignment operator; e.g.

Expand|Select|Wrap|Line Numbers
  1. int foo= 1;
  2.  
  3. foo+= 41; // foo has value 42 now
  4.  
You can do the same with most of the other binary operators; && and || can't
be used like that.

kind regards,

Jos
Jul 28 '07 #2
eg a+=1 means a=a+1 such an operation can be used for all arithmetic operations
Jul 28 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: r0adh0g | last post by:
I am attempting to build a primitive search form on my site. It is searching an Access Database Table and comparing on field in the database to a field passed from the form. Works great if only...
1
by: johndesp | last post by:
I am building an xml document to represent a url request. Some urls contain d equal signs appended to the url. Its important I preserve the equal sign in hte xml document. However, my parser is...
1
by: lbbs | last post by:
Newbie, so please don't flame me. I am just starting to learn access. I seem a feature in access a while ago, but don't remember what it was called. I seen project lab example that had, a plus...
0
by: Emil Georgiev | last post by:
Hell I have a Web Custom Control project in ASP.NET. I'm using a subclassing technique to add functionality in HyperLink web server control. I want to create a property "BrowserWindow" of my...
1
by: buntyindia | last post by:
Hi , I am exporting files from my application. Files those are not supposed to be exported are of two types : 1.) Blank with Zero bytes 2.) Other one is in a format # #Mon Aug 13 14:33:02...
1
by: sesseth | last post by:
can someone help me, it says "Operator "=" is not defined for types "System.Drawing.Point" and "System.Drawing.Point"" The code is "Rabbitbox.Location = Carrots.Location" any ideas?
11
by: =?ISO-8859-1?Q?Konrad_M=FChler?= | last post by:
Hi, a simple question: Which standard function in c++ gives me the sign of a number? Thanks Konrad
5
by: souporpower | last post by:
Hi All I am using ajax as follows: var parameters = "groups=" + escape(myemail+100@gmail.com); var url="/mydomain/ajaxCall"; if (req != null) { req.open("POST", url, true);
1
by: =?Utf-8?B?Sm9zdWZm?= | last post by:
Hi: I've been using MSN Bill Pay for years to pay my bills. I recently decided to look into Microsoft Money as I wanted a desktop application to manage and pay my bills. I downloaded the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.