Making a Calender

Hey, me again, asking for help on an assignment. I can't get the days of the month to stick no matter how I call it. right now this is where I am.

Header file
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <iostream>
using namespace std;


class Month
{
private:
	int month;
	string name_of_month;
	int days_in_month;
	int month_start;


public:
	Month(int,string, int, int);
	static int print();
	static const int SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY;
	static const int JANUARY, FEBRUARY, MARCH, APRIL, MAY, JUNE, JULY, AUGUST, SEPTEMBER, OCTOBER, NOVEMBER, DECEMBER;
	
};




Source File
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#include "Month.h"
using namespace std;

// Days of the week
const int Month::SUNDAY = 0;
const int Month::MONDAY = 1;
const int Month::TUESDAY = 2;
const int Month::WEDNESDAY = 3;
const int Month::THURSDAY = 4;
const int Month::FRIDAY = 5;
const int Month::SATURDAY = 6;

// Months of the year
const int Month::JANUARY = 7;
const int Month::FEBRUARY = 8;
const int Month::MARCH = 9;
const int Month::APRIL = 10;
const int Month::MAY = 11;
const int Month::JUNE = 12;
const int Month::JULY = 13;
const int Month::AUGUST = 14;
const int Month::SEPTEMBER = 15;
const int Month::OCTOBER = 16;
const int Month::NOVEMBER = 17;
const int Month::DECEMBER = 18;

Month::Month(int Days, string MonthName, int Mon, int start)
{
	days_in_month = Days;
	name_of_month = MonthName;
	month = Mon;
	month_start = start; 
}

int print()
{
	cout << Month::MARCH;

	if(Month::JANUARY || Month::MARCH || Month::MAY || Month::JULY || Month::AUGUST || Month::OCTOBER || Month::DECEMBER)
	{
		Month::days_in_month = 31;
	}
	else if (Month::FEBRUARY)
	{
		Month::days_in_month = 28;
	}
	else 
	{
		Month::days_in_month = 30;
	}
}


At days_in_month, it keeps telling me I can't access the variable. Thanks in advance to anyone who can help me out.
Static member functions can only access static member variables.
Topic archived. No new replies allowed.