Skip to content

Latest commit

 

History

History
97 lines (53 loc) · 4.75 KB

CppBoostAdjacency_listExample1.md

File metadata and controls

97 lines (53 loc) · 4.75 KB

 

 

 

 

 

 

Technical facts

 

Operating system(s) or programming environment(s)

IDE(s):

Project type:

C++ standard:

Compiler(s):

Libraries used:

  • STL STL: GNU ISO C++ Library, version 4.9.2

 

 

 

 

 

Qt project file: ./CppBoostAdjacency_listExample1/CppBoostAdjacency_listExample1.pro

 


include(../../ConsoleApplication.pri) #Or use the code below # QT += core # QT += gui # greaterThan(QT_MAJOR_VERSION, 4): QT += widgets # CONFIG   += console # CONFIG   -= app_bundle # TEMPLATE = app # CONFIG(release, debug|release) { #   DEFINES += NDEBUG NTRACE_BILDERBIKKEL # } # QMAKE_CXXFLAGS += -std=c++11 -Wall -Wextra -Weffc++ # unix { #   QMAKE_CXXFLAGS += -Werror # } include(../../Libraries/Boost.pri) #Or use the code below # win32 { #   INCLUDEPATH += \ #     ../../Libraries/boost_1_54_0 # } SOURCES += main.cpp

 

 

 

 

 

./CppBoostAdjacency_listExample1/main.cpp

 


#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Weffc++" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #include <boost/graph/adjacency_list.hpp> #pragma GCC diagnostic pop int main() {   typedef boost::adjacency_list   <     //Store all out edges as a std::vector     boost::vecS,     //Store all vertices in a std::vector     boost::vecS,     //Relations are directed     boost::directedS,     //All vertices are person names of type std::string     boost::property<boost::vertex_name_t,std::string>,     //All edges are relation of type std::string     boost::property<boost::edge_name_t,std::string>   > Graph;   Graph g; }