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
|
vector<Sommet> vs = vector<Sommet>();
vector<Relation> vr = vector<Relation>();
Sommet* s1 = new Sommet(1);
Sommet* s2 = new Sommet(2);
Relation* r = new Relation();
int p = 23;
r->setS1(*s1);
r->setS2(*s2);
r->setPoids(p);
cout << *s1 << endl;
cout << *s2 << endl;
cout << *r << endl;
vs.push_back(*s1);
vs.push_back(*s2);
vr.push_back(*r);
//
GrapheOriente* gno = new GrapheOriente(vs, vr);
cout << *gno << endl;
delete gno;
delete r;
delete s1;
delete s2; |
Partager