将整数转换为以 10 为底的 char*
std::itoa(ConCounter, ID, 10);
ConCounter 是整数,ID 是 char*,10 是基数
它说 iota 不是 std 的成员,没有 std 它不会被声明。我知道这是一个非标准函数,但我包含了它的所有库,但它仍然看不到它。
有什么办法可以做到以上几点?有什么快速的一号线吗?我尝试了以下方法;
std::to_string //it's not declared for me when using mingw, it doesn't exist.
snprintf/sprintf //should work but it gives me the "invalid conversion from 'int' to 'char *'" error
std::stoi //has same problem as iota