can't figure print error

For "printCalBody (int& daysWeek, int inMonth)" I get error msg's (1) expected primary expression before "int" for this line. On following line I get error "expected ';' before '{' token, can someone explain what I did wrong here, just not getting it?


int main()
{
int currentMonth;
int inputYear;
int inMonth;
int daysWeek;
currentMonth = 5;

do
{
cout << "input the year you would like a calendar for [1]2010 or [2]2011: ""\n";
cin >> inputYear;
cout << "What day of the week is the 1st on for this month? " "\n\n";
cout << "Pick from the menu & enter the number: " "\n\n";
cout << "[0]Sun ,[1]Mon ,[2]Tues ,[3]Wed ,[4]Thu ,[5]Fri ,[6]Sat" "\n";
daysWeek = reader.readInt(0, 6);
}
while (currentMonth <= 12);
{
printCalHead (currentMonth);
if(currentMonth == 4 || currentMonth == 6 || currentMonth == 9 || currentMonth == 11)
inMonth = 30;
else
{
inMonth = 31;

if(currentMonth == 2);
{
inMonth = 28;
}
if(inputYear % 4 == 0)
{
inMonth = 29;
}
}

printCalBody(daysWeek, inMonth);
cout << endl << endl;
currentMonth++;

system("pause");
return 0;
}

//prints the heading for each months calendar
void printCalHead (int& currentMonth);
{
if(currentMonth == 5)
{
cout << "May 2010" << endl;
}
if(currentMonth == 6)
{
cout << "June 2010" << endl;
}
if(currentMonth == 7)
{
cout << "July 2010" << endl;
}
if(currentMonth == 8)
{
cout << "August 2010" << endl;
}
if(currentMonth == 9)
{
cout << "September 2010" << endl;
}
if(currentMonth == 10)
{
cout << "October 2010" << endl;
}
if(currentMonth == 11)
{
cout << "November 2010" << endl;
}
if(currentMonth == 12)
{
cout << "December 2010" << endl;
}
if(currentMonth == 1)
{
cout << "January 2011" << endl;
}
if(currentMonth == 2)
{
cout << "February 2011" << endl;
}
if(currentMonth == 3)
{
cout << "March 2011" << endl;
}
if(currentMonth == 4)
{
cout << "April 2011" << endl;
}
cout << endl;

cout << setw(5) << "S" << ""
<< setw(5) << "M" << ""
<< setw(5) << "T" << ""
<< setw(5) << "W" << ""
<< setw(5) << "T" << ""
<< setw(5) << "F" << ""
<< setw(5) << "S" << endl;

cout << " _________________________" << endl;
}

//prints the calendar body
printCalBody (int& daysWeek, int inMonth)
{
int day, dayAlign;

day = 1;
dayAlign = 0;

while(day <= inMonth)
{
while(dayAlign < daysWeek);
{
cout << " ";
dayAlign++;
}

cout << setw(5) << day;
cout << " ";

daysWeek++;
day++;
dayAlign++;

if(daysWeek == 7)
{
cout << endl;
daysWeek = 0;
}
}
}}

printCalBody (int& daysWeek, int inMonth)

You're missing the function type.
Thanks got it now
Topic archived. No new replies allowed.