FreakNasty188
Active Member
- Joined
- Jul 15, 2011
- Sythe Gold
- 0
- Messages
- 174
Hey guys I'm writing a basic C++ program for my programming class. Basically the user inputs their numerical birth month and it tells them what season they were born in. I have the code written, but I'm getting these errors.
Error 1 error C2660: 'season' : function does not take 1 arguments c:\users\kevin\desktop\cmpsc101\10_4_11\10_4_11\p1.cpp 20
And
Error 2 error C2447: '{' : missing function header (old-style formal list?) c:\users\kevin\desktop\cmpsc101\10_4_11\10_4_11\p1.cpp 24
And
3 IntelliSense: expected a declaration c:\users\kevin\desktop\cmpsc101\10_4_11\10_4_11\p1.cpp 24
Here's my program:
Anyone think they can help?
Error 1 error C2660: 'season' : function does not take 1 arguments c:\users\kevin\desktop\cmpsc101\10_4_11\10_4_11\p1.cpp 20
And
Error 2 error C2447: '{' : missing function header (old-style formal list?) c:\users\kevin\desktop\cmpsc101\10_4_11\10_4_11\p1.cpp 24
And
3 IntelliSense: expected a declaration c:\users\kevin\desktop\cmpsc101\10_4_11\10_4_11\p1.cpp 24
Here's my program:
#include <iostream>
using namespace std;
void birthMonth();
void season();
int main()
{
birthMonth();
return 0;
}
void birthMonth()
{
int month;
cout << "Enter your numerical birth month: ";
cin >> month;
season(month);
}
void season (int month);
{
if (month < 1)
cout << "Invalid birth month";
else if (month <= 3)
cout << "Your birth month is in the Winter.";
else if (month <= 6)
cout << "Your birth month is in the Spring.";
else if (month <= 9)
cout << "Your birth month is in the Summer.";
else if (month <= 12)
cout << "Your birth month is in the Fall.";
else
cout << "Invalid birth month";
}
Anyone think they can help?
