BGL documentation bugs

in the file: http://www.boost.org/libs/graph/doc/quick_tour.html there's an extra comma at the end of the declaration: Edge edge_array[] = { Edge(A,B), Edge(A,D), Edge(C,A), Edge(D,C), Edge(C,E), Edge(B,D), Edge(D,E), }; And a little after appears this line: Graph g(edge_array, edge_array + sizeof(edge_array) / sizeof(E), num_vertices); but I think the correct should be: Graph g(edge_array, edge_array + sizeof(edge_array) / sizeof(Edge), num_vertices); Since the first gives a segmentation faul and I think doesnt make too much sense to use sizeof(E)... -- Felipe Magno de Almeida UIN: 2113442 email: felipe.almeida at ic unicamp br, felipe.m.almeida at gmail com, felipe at synergy com I am a C, modern C++, MFC, ODBC, Windows Services, MAPI developer from synergy, and Computer Science student from State University of Campinas(UNICAMP). To know more about: Unicamp: http://www.ic.unicamp.br Synergy: http://www.synergy.com.br current work: http://www.mintercept.com "There is no dark side of the moon really. Matter of fact it's all dark."

On Apr 27, 2005, at 4:51 PM, Felipe Magno de Almeida wrote:
in the file: http://www.boost.org/libs/graph/doc/quick_tour.html
there's an extra comma at the end of the declaration: Edge edge_array[] = { Edge(A,B), Edge(A,D), Edge(C,A), Edge(D,C), Edge(C,E), Edge(B,D), Edge(D,E), }; And a little after appears this line:
Graph g(edge_array, edge_array + sizeof(edge_array) / sizeof(E), num_vertices); but I think the correct should be: Graph g(edge_array, edge_array + sizeof(edge_array) / sizeof(Edge), num_vertices); Since the first gives a segmentation faul and I think doesnt make too much sense to use sizeof(E)...
Thanks! I've fixed both problems in CVS. Doug
participants (2)
-
Doug Gregor
-
Felipe Magno de Almeida