Boost logo

Boost Users :

From: Douglas Gregor (doug.gregor_at_[hidden])
Date: 2007-06-12 10:42:48


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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net