Skip to content
Snippets Groups Projects
printList.h 769 B
Newer Older
  • Learn to ignore specific revisions
  • Lars Bilke's avatar
    Lars Bilke committed
    /**
    
    Lars Bilke's avatar
    Lars Bilke committed
     * Copyright (c) 2012, OpenGeoSys Community (http://www.opengeosys.net)
     *            Distributed under a Modified BSD License.
     *              See accompanying file LICENSE.txt or
     *              http://www.opengeosys.net/LICENSE.txt
     *
     *
    
    Lars Bilke's avatar
    Lars Bilke committed
     * \file printList.h
    
    Lars Bilke's avatar
    Lars Bilke committed
     * Created on 2011-02-23 by Thomas Fischer
    
     */
    
    #ifndef PRINTLIST_H_
    #define PRINTLIST_H_
    
    // STL
    #include <list>
    #include <string>
    #include <iostream>
    
    
    namespace BaseLib {
    
    
    void printList (std::list<size_t> const& mylist, std::string const& title)
    {
    	std::cout << title << std::endl;
    	for (std::list<size_t>::const_iterator my_it (mylist.begin());
    		my_it != mylist.end(); my_it++) {
    		std::cout << *my_it << " ";
    	}
    	std::cout << std::endl;
    }
    
    
    } // end namespace BaseLib
    
    
    #endif /* PRINTLIST_H_ */