# include<iostream>
# include<string>
using namespace std;
void test01()
{
string str1 = "Hello";
string str2 = "Hello";
if (str1.compare(str2) == 0)
{
cout << "str1等于str2" << endl;
}
}
int main()
{
test01();
system("pause");
return 0;
}
# include<iostream>
# include<string>
using namespace std;
void test01()
{
string str1 = "Hello";
string str2 = "Hello";
if (str1.compare(str2) == 0)
{
cout << "str1等于str2" << endl;
}
}
int main()
{
test01();
system("pause");
return 0;
}