1234567
std::ofstream outfile (string(name+"."+type).c_str()); const char *path="c:\test"; std::ofstream file(path); outfile <<text<< std::endl; outfile.close();
1234
std::string filename = std::string("c:/test") + "/" + name + "." + type; std::ofstream(filename.c_str()); ...