#include #include using namespace std; int main() { string plate1; string plate2 = "HGB 634"; string plate3("TRT 321"); string plate4(plate2); // copy constructor string plate17; // cout << "Please enter a license plate number" << flush; cout << plate1 << "|" << plate2 << "|" << plate3 << "|" << plate4 << endl; plate2[2] = 'X'; cout << plate1 << "|" << plate2 << "|" << plate3 << "|" << plate4 << endl; string end = plate3.substr(4,3); cout << "end: " << end << endl; bool mt = plate1.empty(); if (mt) { cout << "plate1 is empty" << endl; } else { cout << "plate 1 is not empty" << endl; } cout << "lengths: " << plate1.length() << " " << plate2.length() << " " << plate3.length() << " " << plate4.length(); plate1.resize(7,'-'); cout << plate1 << "|" << plate2 << "|" << plate3 << "|" << plate4 << endl; plate1.resize(14); // (3,'x'); cout << plate1 << "|" << plate2 << "|" << plate3 << "|" << plate4 << endl; string plate5; plate5 = plate1; plate1 = 'I'; cout << "plates 1 and 5: " << plate1 << " " << plate5 << endl; plate1 += " M GR8"; cout << "plate1: " << plate1 << endl; cout << "plates1 and 5 concatenated together" << plate1 + plate5 << endl; if (plate1 > plate2) { cout << "plate1 " << plate1 << " is greater than plate2 " << plate2 << endl; } else { cout << "plate1 " << plate1 << " is less than plate2 " << plate2 << endl; } return 0; }