473,480 Members | 1,872 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

+= plus equal sign

5 New Member
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 71024
JosAH
11,448 Recognized Expert MVP
+= 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
puppysri
2 New Member
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
4102
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
6681
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
2092
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
1483
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
1797
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
1301
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
45183
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
9065
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
3777
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
7041
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6908
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7043
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
4776
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
2995
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2984
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
563
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
179
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.