TDT4102-Ovinger/Oving8/Oving 8/main.cpp

57 lines
964 B
C++
Raw Permalink Normal View History

2019-03-02 19:21:31 +01:00
// Example program in TDT4102_Graphics template, from PPP page 415
2019-03-04 15:10:11 +01:00
#include "GUI.h"
2019-03-02 19:21:31 +01:00
#include "Graph.h"
2019-03-04 15:10:11 +01:00
#include "MeetingWindow.h"
2019-03-03 21:46:58 +01:00
2019-03-04 15:10:11 +01:00
// The following pragma turns off the console
//#pragma comment(linker, "/SUBSYSTEM:windows /ENTRY:mainCRTStartup")
using namespace Graph_lib;
2019-03-02 19:21:31 +01:00
int main() {
2019-03-03 21:46:58 +01:00
2019-03-04 15:10:11 +01:00
/*
2019-03-03 21:46:58 +01:00
Car c1{ 5 };
Car c2{ 0 };
2019-03-04 15:10:11 +01:00
Car c3{ 4 };
2019-03-03 21:46:58 +01:00
Person p1{ "Oyvind", "mail", &c1 };
Person p2{ "Ulrik", "mail2" };
Person p3{ "Live", "mail3", &c2 };
2019-03-04 15:10:11 +01:00
Person p4{ "Per", "mail4", &c3 };
2019-03-03 21:46:58 +01:00
2019-03-04 15:10:11 +01:00
2019-03-03 21:46:58 +01:00
cout << p1 << endl;
cout << p2 << endl;
cout << p3 << endl;
2019-03-04 15:10:11 +01:00
Meeting m1{ 13, 1300, 1500, Campus::Trondheim, "Test", &p1 };
m1.addParticipant(&p2);
m1.addParticipant(&p3);
Meeting m2{ 13, 1200, 1500, Campus::Trondheim, "Test", &p4 };
cout << m1;
m1.findPotentialCoDriving();
*/
MeetingWindow win{Point{100, 100}, 600, 400, "Meetings" };
gui_main();
for (const auto p : win.getPeople())
{
cout << p->getName() << endl;
}
2019-03-03 21:46:58 +01:00
keep_window_open();
2019-03-04 15:10:11 +01:00
2019-03-03 21:46:58 +01:00
return 0;
2019-03-02 19:21:31 +01:00
}