注册 登录
编程论坛 C++教室

"stoull"使用报错

飞跃的乌龟 发布于 2019-04-13 13:27, 2056 次点击
程序代码:
#include <iostream>   // std::cout
#include <string>     // std::string, std::stoull

int main ()
{
  std::string str = "8246821 0xffff 020 -1";

  std::string::size_type sz = 0;   // alias of size_t

  while (!str.empty()) {
    unsigned long long ull = std::stoull (str,&sz,0);
    std::cout << str.substr(0,sz) << " interpreted as " << ull << '\n';
    str = str.substr(sz);
  }

  return 0;
}

error C2039: 'stoull' : is not a member of 'std'
error C2065: 'stoull' : undeclared identifier

是要添加额外的包还是说代码写错了
2 回复
#2
rjsp2019-04-13 14:51
什么编译器?
连C++11都不支持?
#3
飞跃的乌龟2019-04-13 22:17
回复 2楼 rjsp
1