#include < string.h >
class LongLongTripDiv2
{
public:
std::string isAble(long D, int T, int B)
{
//....
//...
}
};
The above code gives an error: ‘String’ in namespace ‘std’ does not name a type std::String isAble(long D, int T, int B) I have tried everything "using namespace std" and "using std::string but it still doesn't works.
上面的代码给出了一个错误:命名空间“std”中的“String”没有命名类型std::String isAble(long D, int T, int B)我已经尝试过“使用命名空间std”和“使用std::String”,但它仍然不起作用。
1 个解决方案
#1
4
Your include statement is wrong.
你的包含语句是错误的。
#include <string>
class LongLongTripDiv2
{
public:
std::string isAble(long D, int T, int B);
};
#1
4
Your include statement is wrong.
你的包含语句是错误的。
#include <string>
class LongLongTripDiv2
{
public:
std::string isAble(long D, int T, int B);
};