Есть функция вывода поддерживаемых процессором инструкций в консоль. Помогите переделать чтобы сохранялось в файлик.
auto& outstream = std::cout;
auto support_message = [&outstream](std::string isa_feature, bool is_supported) {
outstream << isa_feature << (is_supported ? " supported" : " not supported") << std::endl;
};
auto support_message = [](std::ostream& out, std::string isa_feature, bool is_supported) {
return out << isa_feature
<< (is_supported ? " supported" : " not supported") << std::endl;
};
Ну, а потом
ofstream log("Logfile",ios::ate);
support_message(cout,"feature",true);
support_message(log,"feature",true);
Примерно так.
Сделал вот так. Работает)
ofstream log("Logfile.txt");
auto support_message = [&log](std::string isa_feature, bool is_supported) { log << isa_feature << (is_supported ? " supported" : " not supported") << std::endl; };
Основные этапы разработки сайта для стоматологической клиники
Продвижение своими сайтами как стратегия роста и независимости