Код: Выделить всё
template
char* foo() {
// return a compile-time string containing N, equivalent to doing
// ostringstream ostr;
// ostr
Подробнее здесь: [url]https://stackoverflow.com/questions/6713420/c-convert-integer-to-string-at-compile-time[/url]
Мобильная версия