-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcallon.cpp
More file actions
42 lines (41 loc) · 1017 Bytes
/
callon.cpp
File metadata and controls
42 lines (41 loc) · 1017 Bytes
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
//====================================================
// An in-class call-on-student manager
//====================================================
#include "CallOnApp.h"
#include "Roster.h"
#include <fstream>
#include <iostream>
#include <string>
#include <sstream>
#include <vector>
#include <random>
#include <FL/Fl.H>
//
// Main: create window and widget, and show
//
int main(int argc, char* argv[])
{
Roster roster;
std::string filename;
if (argc > 1) {
filename = argv[1];
} else {
filename = "trlist.csv";
}
if (!roster.loadFile(filename)) {
std::cout << "Error: couldn't read input file\n";
return -1;
}
/** auto student = roster.selectStudent();
if (student)
{
std::cout << "selected: [" << student->saveString() << "]\n";
}
**/
CallOnApp app(roster);
//app.createWindow(argc, argv[2]);
// fix the call for arguments, eventually
app.createWindow(1, argv);
// the standard way to run an FLTK GUI app
return (Fl::run());
}