#include <iostream>
#include <string.h>
using namespace std;
inline void test(const char *title, bool value)
{
cout << title << " returns " << (value ? "true" : "false") << endl;
}
int main()
{
string s = "DEF";
cout << "s is " << s << endl;
string m;
cout << "plesse enter m:";
cin >> m;
cout << "length of m:" << m.length() << endl;
test("s <= \"ABC\"", s <= "ABC");
test("\"DEF\" <= s", "DEF" <= s);
m+=s;
cout << "m = m + s : " << m << endl;
cout << "length of m:" << m.length() << endl;
return 0;
}
#include <string.h>
using namespace std;
inline void test(const char *title, bool value)
{
cout << title << " returns " << (value ? "true" : "false") << endl;
}
int main()
{
string s = "DEF";
cout << "s is " << s << endl;
string m;
cout << "plesse enter m:";
cin >> m;
cout << "length of m:" << m.length() << endl;
test("s <= \"ABC\"", s <= "ABC");
test("\"DEF\" <= s", "DEF" <= s);
m+=s;
cout << "m = m + s : " << m << endl;
cout << "length of m:" << m.length() << endl;
return 0;
}