<iterator>
static std::string index;
void
index_init()
{
std::fstream index_page_file("template/index.tpl");
index = std::string((std::istreambuf_iterator<char>(index_page_file)),
std::istreambuf_iterator<char>());
index_page_file.close();
}
const std::string&
index_page()
{
return index;
}
index_page_file.close(); - лишнее
Обсуждают сегодня