newDay help! urgent! due today!!!

Hey everyone. I'm almost finished with my newDay program... with 1 small problem. whenever i input the day into the program, the day comes up as 1 every time. seems like a simple hiccup from me, but i can't find where i went wrong.
Here's what I have so far...

#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
void newDAY (int&,int&,int&);
int main()
{
int month,day,year,n;
cout <<"Enter the Month: ";
cin >>month;
cout <<"Enter the Day: ";
cin >>day;
cout <<"Enter the Year: ";
cin >>year;
for (n=0;n<10;n++)
{
newDAY (month,day,year);
cout <<month<<" "<<day<<" "<<year <<endl;
}
if ((month=1)||(month=3)||(month=5)||(month=7)||(month=8)||(month=10))
{
day=31;
day=1;
month++;
}
if ((month=2))
{
day=28;
day=1;
month=+1;
}
if ((month=4)||(month=6)||(month=9)||(month=11))
{
day=30;
day=1;
month=+1;
}
if ((month=12))
{
day=31;
month=1;
year=+1;
day=1;
}
system("pause");
return 0;
}

void newDAY(int& m,int& d, int&y)
{
d=+1;
}
void newDAY(int& m,int& d, int&y)
{
d=+1;
}

you probably mean d += 1;, don't you?

Edit:
It's in a few other places, too.
And there are other mistakes also. ( = where it should be == as far as i can guess...)
Last edited on
thanks for the help! it helped a tad... but you were right, i had many more errors.
Topic archived. No new replies allowed.