Newbie Boost::Graph - How to write to a .dot file

Hi there, I am having difficulty writing to a .dot file. After typing in the follwoing code (following the example in the book, p.85). write_graphviz("ECgraphs/test_network.dot",angle_list); I get the following error message: Error 89 error C2664: 'boost::write_graphviz' : cannot convert parameter 1 from 'const char [26]' to 'std::ostream &' What code do I have to write to convert my 'const char [26]' to a 'std::ostream &'? Thanks, Kind regards, Erica.

On Jun 12, 2007, at 6:45 AM, Erica Calogero wrote:
Hi there,
I am having difficulty writing to a .dot file. After typing in the follwoing code (following the example in the book, p.85).
write_graphviz("ECgraphs/test_network.dot",angle_list);
I get the following error message:
Error 89 error C2664: 'boost::write_graphviz' : cannot convert parameter 1 from 'const char [26]' to 'std::ostream &'
What code do I have to write to convert my 'const char [26]' to a 'std::ostream &'?
#include <fstream> ... std::ofstream out("ECgraphs/test_network.dot"); write_graphviz(out, angle_list); HTH, Doug
participants (2)
-
Douglas Gregor
-
Erica Calogero