PLEASE HELP? 4 month calendar

hi, im supposed to make a 4 month calendar, i keep getting these 5 errors, if someone can please help me fix these, please?

the errors im getting are:
"80:6 redefinition of 'void viewNote(std::string*)'"
"73:6 'void viewNote(std::string*)' previously defined"
87:6 redefiniftion of 'void viewNote(std::string*)'
91:7 expected ';' before 'date'
and error in line 24 'viewNote' was not declared.
also in the second switch case it says the 'viewNote' was not delcared.

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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#include <iostream>
#include <cstdlib>
#include <string>
#include <fstream>
using namespace std;

int userChoice;
int main()
{

string april[30];
string may[31];
string june[30];
string july[30];
ofstream outfile;
outfile.open("program6.txt");
cout << "Heres a calendar that's April-July" << endl;
cout << "You can view by day or view by month" << endl;
cout << "Pick month:" << endl;
cout << "1 for April, 2 for May, 3 for June, 4 for July" << endl;
cin >> userChoice;
cout << "Pick day" << endl;
cin >> userChoice;
cout << userChoice << ":" << viewNote << endl;
cout << "1 for view note, 2 for delete/clear, 3 for overwrite note." << endl;

string currentMonth;
switch (userChoice) 
{
case 1: 
currentMonth= "april";
break;
case 2:
currentMonth= "may";
break;
case 3:
currentMonth= "june";
break;
case 4:
currentMonth= "july";
break;
}
switch (userChoice)
{
case 1:
if (currentMonth=="april")
{
viewNote(april);
}
break;
case 2:
if (currentMonth=="may")
{
viewNote(may);
}
break;
case 3:
if (currentMonth=="june")
{
viewNote(june);
}
break;
case 4:
if (currentMonth=="july")
{
viewNote(july);
}
break;
}
}


void viewNote (string array[30])
{
int date;
cout << "what day do you want to view?" << endl;
cin >> date;
cout << array[date-1];
}
void viewNote (string array[31])
{
int date;
cout << "What day do you want to view?" << endl;
cin >> date;
cout << array[date-1];
}
void viewNote (string array[30])
{ 
int date;
cout << "what day do you want to view>" << endl;
cin date;
cout << array[date-1];
}
Last edited on
Please do not post the same question mutliple times.
http://www.cplusplus.com/forum/beginner/128875/
Topic archived. No new replies allowed.