Bonjour! j'ai commencer a travailler avec c++ et la lib Boost Graph sous QT.
sachant que c'est la premi�re fois que je les utilise, je n'arrive pas a trouver des exemples qui fonctionnent a ce qui concerne la lecture/ecriture des graphes dans des fichiers. Quelqu'un peut m'aider svp?
j'ai fais un petit programme :
mais je tombe sur des erreurs:
Code : S�lectionner tout - Visualiser dans une fen�tre � part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 #include <boost/graph/graphviz.hpp> using namespace std; using namespace boost; int main(int argc, char const *argv[]) { typedef adjacency_list< vecS, vecS, undirectedS > Graph; Graph g(0); dynamic_properties dp(ignore_other_properties); ifstream fin("HelloWorld.dot"); read_graphviz(fin, g, dp); }
Code : S�lectionner tout - Visualiser dans une fen�tre � part
1
2
3
4 declaration of C function 'int main(int, const char**)' conflicts with int main(int argc, char const *argv[]) ^ previous declaration 'int main()' here int main() ^ 'read_graphviz_new' was not declared in this scope return read_graphviz_new(std::string(user_first, user_last), graph, dp, node_id); ^
Partager