2
0
mirror of https://github.com/boostorg/graph.git synced 2026-01-26 18:42:12 +00:00
Files
graph/test/digraph.cpp
Jeremy Siek 2634809dfe new file
[SVN r2106]
2004-04-06 01:35:04 +00:00

27 lines
440 B
C++

#include <string>
#include <iostream>
#include <boost/graph/digraph.hpp>
struct city;
struct road;
typedef boost::digraph<city, road> graph_t;
struct city {
city(std::string n) : name(n) { }
std::string name;
};
struct road {
unsigned int length;
};
int main()
{
graph_t g;
city jersey("New Jersey");
graph_t::vertex_descriptor v = add_vertex(jersey, g);
std::cout << "v->name: " << v->name << std::endl;
return 0;
}