MCPcopy Create free account
hub / github.com/ShiqiYu/CPP / main

Function main

week04/examples/stdstring.cpp:5–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3
4using namespace std;
5int main()
6{
7 std::string str1 = "Hello";
8 std::string str2 = "SUSTech";
9 std::string result = str1 + ", " + str2;
10
11 cout << "result = " + result << endl;
12
13 cout << "The length is " << result.length() << endl;
14
15 cout << "str1 < str2 is " << (str1 < str2) << endl;
16
17 cout << "str1[100] = (" << str1[100] << ")" << endl;
18
19 return 0;
20}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected