doc/getstart.dox
changeset 1520 c2c76e4598f6
parent 1519 17e367a93cbb
child 1528 1aa71600000c
     1.1 --- a/doc/getstart.dox	Mon Jun 27 19:47:09 2005 +0000
     1.2 +++ b/doc/getstart.dox	Mon Jun 27 20:44:29 2005 +0000
     1.3 @@ -106,40 +106,11 @@
     1.4  \section helloworld My first program using LEMON
     1.5  
     1.6  If you have installed LEMON on your system you can paste the
     1.7 -following code segment into a file (named e.g. \c hello_lemon.cc)
     1.8 -to have a first working program that uses library LEMON.
     1.9 +following code segment into a file (you can find it as \c
    1.10 +demo/hello_lemon.cc in the LEMON package) to have a first working
    1.11 +program that uses library LEMON.
    1.12  
    1.13 -\code
    1.14 -#include <iostream>
    1.15 -#include <lemon/list_graph.h>
    1.16 -
    1.17 -int main()
    1.18 -{
    1.19 -  typedef lemon::ListGraph Graph;
    1.20 -  typedef Graph::EdgeIt EdgeIt;
    1.21 -  typedef Graph::NodeIt NodeIt;
    1.22 -  using lemon::INVALID;
    1.23 -
    1.24 -  Graph g;
    1.25 -  
    1.26 -  for (int i = 0; i < 3; i++)
    1.27 -    g.addNode();
    1.28 -  
    1.29 -  for (NodeIt i(g); i!=INVALID; ++i)
    1.30 -    for (NodeIt j(g); j!=INVALID; ++j)
    1.31 -      if (i != j) g.addEdge(i, j);
    1.32 -
    1.33 -  std::cout << "Nodes:";
    1.34 -  for (NodeIt i(g); i!=INVALID; ++i)
    1.35 -    std::cout << " " << g.id(i);
    1.36 -  std::cout << std::endl;
    1.37 -
    1.38 -  std::cout << "Edges:";
    1.39 -  for (EdgeIt i(g); i!=INVALID; ++i)
    1.40 -    std::cout << " (" << g.id(g.source(i)) << "," << g.id(g.target(i)) << ")";
    1.41 -  std::cout << std::endl;
    1.42 -}
    1.43 -\endcode
    1.44 +\include hello_lemon.cc
    1.45  
    1.46  First let us briefly explain how this program works.
    1.47  
    1.48 @@ -159,11 +130,10 @@
    1.49  \c target and
    1.50  \c source member functions can be used to access the endpoints of an edge.
    1.51  
    1.52 -If you have saved the preceding code into a file named, say, \c
    1.53 -hello_lemon.cc and your installation of LEMON into directory \c
    1.54 -/usr/local was successful then it is very easy to compile this
    1.55 -program with the following command (the argument <tt>-lemon</tt>
    1.56 -tells the compiler that we are using the installed library LEMON):
    1.57 +If your installation of LEMON into directory \c /usr/local was
    1.58 +successful then it is very easy to compile this program with the
    1.59 +following command (the argument <tt>-lemon</tt> tells the compiler
    1.60 +that we are using the installed library LEMON):
    1.61  
    1.62  \verbatim
    1.63  g++ hello_lemon.cc -o hello_lemon -lemon