std::string BOOST_WAVETEST_GETSTRING(std::ostrstream& ss)
{
    ss << ends;
    std::string rval = ss.str();
    ss.freeze(false);
    return rval;
}
예제 #2
0
파일: config.hpp 프로젝트: fpelliccioni/hpx
inline std::string HPX_PLUGIN_OSSTREAM_GETSTRING(std::ostrstream& ss)
{
    ss << std::ends;
    std::string rval = ss.str();
    ss.freeze(false);
    return rval;
}
예제 #3
0
파일: log.cpp 프로젝트: Kr1sso/vlee
void log::save(std::string filename) {
//	FILE *fp = fopen_s(filename.c_str(), "w");
	FILE *fp;
	fopen_s(&fp, filename.c_str(), "w");

	if (!fp) throw FatalException("unable to open logfile!");

	char *string = new char[logstream.pcount() + 1];
	memcpy(string, logstream.str(), logstream.pcount() + 1);
	string[logstream.pcount()] = '\0';
	fprintf(fp, "%s", string);
	delete string;

	fclose(fp);
}