diff --git a/stim/biomodels/network.h b/stim/biomodels/network.h index aeeead0..bd799a0 100644 --- a/stim/biomodels/network.h +++ b/stim/biomodels/network.h @@ -79,7 +79,7 @@ class network{ } */ - edge(std::vector p, std::vector s) + edge(std::vector > p, std::vector s) : cylinder(p,s) { } @@ -599,7 +599,7 @@ public: int dims[2]; ///number of vertex, number of edges readHeader(filename, &dims[0]); //read header std::ifstream file; - file.open(filename, std::ios::in | std::ios::binary); ///skip header information. + file.open(filename.c_str(), std::ios::in | std::ios::binary); ///skip header information. file.seekg(14+58+4+4, file.beg); vertex v; for(int i = 0; i < dims[0]; i++) ///for every vertex, read vertex, add to network. @@ -626,7 +626,7 @@ public: { writeHeader(filename); std::ofstream file; - file.open(filename, std::ios::out | std::ios::binary | std::ios::app); ///since we have written the header we are not appending. + file.open(filename.c_str(), std::ios::out | std::ios::binary | std::ios::app); ///since we have written the header we are not appending. for(int i = 0; i < V.size(); i++) ///look through the Vertices and write each one. { // std::cout << i << " " << V[i].str() << std::endl; @@ -650,7 +650,7 @@ public: int hNumVertices = V.size(); ///int byte header storing the number of vertices in the file int hNumEdges = E.size(); ///int byte header storing the number of edges. std::ofstream file; - file.open(filename, std::ios::out | std::ios::binary); + file.open(filename.c_str(), std::ios::out | std::ios::binary); std::cout << hNumVertices << " " << hNumEdges << std::endl; file.write(reinterpret_cast(&magicString.c_str()[0]), 14); //write the file id file.write(reinterpret_cast(&desc.c_str()[0]), 58); //write the description @@ -670,7 +670,7 @@ public: int hNumVertices; ///#vert int hNumEdges; ///#edges std::ifstream file; ////create stream - file.open(filename, std::ios::in | std::ios::binary); + file.open(filename.c_str(), std::ios::in | std::ios::binary); file.read(reinterpret_cast(&magicString[0]), 14); ///read the file id. file.read(reinterpret_cast(&desc[0]), 58); ///read the description file.read(reinterpret_cast(&hNumVertices), sizeof(int)); ///read the number of vertices -- libgit2 0.21.4