代码先行:
template <typename T>
void do_sth(int count)
{
char str_count[10];
//...
itoa(count, str_count, 10);
//...
}
但我得到了一些像这样的编译错误:
error: there are no arguments to ‘itoa’ that depend on a template parameter, so a declaration of ‘itoa’ must be available
error: ‘itoa’ was not declared in this scope
但我确实包括在内<cstdlib>
。谁能告诉我怎么了?