Форматирование строк c++
Как сделать форматирование в c++, наподобие как в этих строках python?:
passwd = 237846
text = f"Your password is {passwd}"
Или
passwd = 237846
text = "Your password is {0}".format(passwd)
Текст ошибки:
temp:45:29: error: 'format' is not a member of 'std'
45 | page += std::cout << std::format("<h2 align='center'>temp: {} C</h2>", t);
| ^~~~~~
exit status 1
'cout' is not a member of 'std'
Часть кода в котором ошибка:
String page;
int t = gettemp();
page += std::cout << std::format("<h2 align='center'>temp: {} C</h2>", t);
gettemp возвращает int