![](/img/trans.png)
[英]c++ to_string was not declared in this scope error [Windows + Devcpp environment]
[英]Eclipse C++ Linux “to_string was not declared in this scope”
#include "Person.h"
#include <string>
using namespace std;
string Person::toSimpleString(){
return getFirstName() + " " + getLastName() + ", Age " + to_string(5);
}
我所有的字符串都可以正常工作,但是我根本无法使to_string函数正常工作。 Eclipse不断告诉我它超出范围。 t
#include <string>
是否需要为#include <string.h>
吗?
我认为您可能缺少“ .h”
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.