c++语言 linux编译通过,windows编译不通过。

bool operator<(Human& man)// 需要修改为 bool operator<(const Human& man) const
{
    return Human.age < man.age;
}
#include<stdio.h>
#include<string>

int main()
{
	const char *p = "abc";
	int i = strlen(p);//这行代码编译不过,//需要添加头文件 string.h
	return 0;
}

猜你喜欢

转载自blog.csdn.net/qd1308504206/article/details/84400472