# Changeset 36:199a65b64d90 in lemon-tutorial

Ignore:
Timestamp:
02/20/10 19:02:04 (10 years ago)
Branch:
default
Phase:
public
Message:

Simplify hello_lemon.cc with 'using namespace' commands

File:
1 edited

Unmodified
Added
Removed
• ## demo/hello_lemon.cc

 r20 * This file is a part of LEMON, a generic C++ optimization library. * * Copyright (C) 2003-2009 * Copyright (C) 2003-2010 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). #include using namespace lemon; using namespace std; int main() { typedef lemon::ListDigraph Graph; Graph g; ListDigraph g; Graph::Node u = g.addNode(); Graph::Node v = g.addNode(); Graph::Arc  e = g.addArc(u, v); ListDigraph::Node u = g.addNode(); ListDigraph::Node v = g.addNode(); ListDigraph::Arc  a = g.addArc(u, v); std::cout << "Hello World! This is LEMON library here." << std::endl; std::cout << "We have a directed graph with " << countNodes(g) << " nodes and " << countArcs(g) << " arc." << std::endl; cout << "Hello World! This is LEMON library here." << endl; cout << "We have a directed graph with " << countNodes(g) << " nodes " << "and " << countArcs(g) << " arc." << endl; return 0;
Note: See TracChangeset for help on using the changeset viewer.