fatal error C1075: end of file found before the left brace '{' at '.\project4.cpp(75)' was matched
i am getting an fatal error and dont understand how to fix it, most help is appreciated

#include <iostream>
#include <iomanip>
using namespace std; 
void displayTitle();
int getMonth(int month);
int getDay(int day);
int getYear(int year);
int CalcDayofWeek(int month, int day, int year);
void DisplayDay(int G);
int main()
	//declare variables
	int month, 
	int M, //month number
		K, //day of the month
		C, //century year
		D, //year number
	CalcDayofWeek(month, day, year);

	return 0;
void displayTitle()
	cout<< setw(30) << "Zeller's Algorithm\n";
int getMonth(int month)
	cout<< "Enter the month ";
	return month;
int getDay(int day)
	cout<< "Enter the day ";
	return day;
int getYear(int year)
	cout<< "enter the year ";
	return year;
int CalcDayofWeek(int month, int day, int year)
    int M = month;
	int K = day;
    int C = year / 100;
    int D = year % 100;
	int G;
	G = static_cast<double>((2.6*M - .2) + K + D + (D/4) + (C/4) - 2 * C);
		if (G < 0)
			G = G + 7;
		return G;
void DisplayDay(int G)
    switch (G)
    case 0: cout << "Sunday" << endl; break;
    case 1: cout << "Monday" << endl; break;
    case 2: cout << "Tuesday" << endl; break;
    case 3: cout << "Wednesday" << endl; break;
    case 4: cout << "Thursday" << endl; break;
    case 5: cout << "Friday" << endl; break;
    case 6: cout << "Saturday" << endl; break;
    case 7: cout << "Sunday" << endl; break;

The fact that a left brace wasn't matched means that you're missing a right brace. And yes, your function DisplayDay does not have a right brace ('}') at the end of its definition. So the compiler, when parsing your program, reached the end of the file without seeing a matching right brace.

This article has been dead for over six months. Start a new discussion instead.