]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/graph/example/vertex-name-property.cpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / libs / graph / example / vertex-name-property.cpp
index c1216f04668bab02d262dffbd8bf89091e963a83..7ae44d4f355c3c74cf8424d80812a3c9831c6315 100644 (file)
@@ -38,7 +38,7 @@ read_graph_file(std::istream & graph_in, std::istream & name_in,
 
 
 int
-main()
+main(int argc, const char** argv)
 {
   typedef adjacency_list < listS,       // Store out-edges of each vertex in a std::list
     vecS,                       // Store vertex set in a std::vector
@@ -47,8 +47,8 @@ main()
    >graph_type;
 
   graph_type g;                 // use default constructor to create empty graph
-  const char* dep_file_name = "makefile-dependencies.dat";
-  const char* target_file_name = "makefile-target-names.dat";
+  const char* dep_file_name = argc >= 2 ? argv[1] : "makefile-dependencies.dat";
+  const char* target_file_name = argc >= 3 ? argv[2] : "makefile-target-names.dat";
   std::ifstream file_in(dep_file_name), name_in(target_file_name);
   if (!file_in) {
     std::cerr << "** Error: could not open file " << dep_file_name