So, here is the problem I am having. I created a button with fltk in a function that when pressed just outputs "Appointment Added". However, right now I want to do more than just display that output to the screen. Here is what I want to function to do. If the Add Event button is pressed get the input from the Event Name text box and the Event Date text box and store that information in my appointment file called list.txt
//static void get_next(Address,Address pw){
//function to move the calendar to the next month goes here
//cout << "THINGS ARE HAPPENING!!"<<'\n';
//}
//static void get_prev(Address,Address pw){
//function to move the calendar to the previous month goes here
//cout << "STUFF IS GOING ON!!"<<'\n';
//}
static void add_appt(Address,Address pw){
//If the Add Event button is pressed
//get the input from the Event Name text box and the Event Date text box
//and store that information in your appointment file(list.txt)
cout << "Appointment Added"<<'\n';
}
int main()
{
int month;
int year;
string filename;
Vector<string> dateVector;
Vector<string> contentVector;
cout <<"Welcome to group 122's 'Make My Day' Program. This is a monthly planner page program along the lines of Microsoft Outlook."<< endl;
cout <<"Please enter a two-digit month:"<< endl;
cin >> month;
cout <<"Please enter a four-digit year:"<< endl;
cin >> year;
cout <<"Enter the name of the appointment file('list.txt'):"<< endl;
cin >> filename;
ifstream ifs(filename.c_str(),ios_base::in); //Reads the file
if (!ifs.is_open()) error("can't open input file",filename); //Displays an error if the file cannot be open
//getline(cin,filename);
//vector<Date>
//string
while(!ifs.eof())
{
string s;
string sd;
//xDate d;
Line day1(Point(100,100),Point(100,125));
day1.set_color(outline_blue);
day1.set_style(Line_style(Line_style::solid,2));
win.attach(day1);
Line day2(Point(200,100),Point(200,125));
day2.set_color(outline_blue);
day2.set_style(Line_style(Line_style::solid,2));
win.attach(day2);
Line day3(Point(300,100),Point(300,125));
day3.set_color(outline_blue);
day3.set_style(Line_style(Line_style::solid,2));
win.attach(day3);
Line day4(Point(400,100),Point(400,125));
day4.set_color(outline_blue);
day4.set_style(Line_style(Line_style::solid,2));
win.attach(day4);
Line day5(Point(500,100),Point(500,125));
day5.set_color(outline_blue);
day5.set_style(Line_style(Line_style::solid,2));
win.attach(day5);
Line day6(Point(600,100),Point(600,125));
day6.set_color(outline_blue);
day6.set_style(Line_style(Line_style::solid,2));
win.attach(day6);
Text sun(Point(35,123), "Sun");
sun.set_font_size(15);
win.attach(sun);
Text mon(Point(135,123), "Mon");
mon.set_font_size(15);
win.attach(mon);
Text tues(Point(230,123), "Tues");
tues.set_font_size(15);
win.attach(tues);
Text wed(Point(330,123), "Wed");
wed.set_font_size(15);
win.attach(wed);
Text thurs(Point(425,123), "Thurs");
thurs.set_font_size(15);
win.attach(thurs);
Text fri(Point(540,123), "Fri");
fri.set_font_size(15);
win.attach(fri);
Text sat(Point(640,123), "Sat");
sat.set_font_size(15);
win.attach(sat);
for(int i=0; i < dateVector.size(); i++) {
istringstream is;
string delimiter = "/";
size_t pos = 0;
int day;
int month;
int year;