#include <iostream>
#include <string>
using namespace std;

class strtype {
    string str;
public:
    strtype() {
        cout << "strtype()" << endl;
        str = "Test";
    }

    strtype(const strtype &st) {
        cout << "strtype(const strtype &)" << endl;
        str = st.str;
    }

    strtype(const string &ss) {
        cout << "strtype(const string &)" << endl;
        str = ss;
    }
    
    strtype(const char *ss) {
        cout << "strtype(const char *)" << endl;
        str = ss;
    }

    strtype& operator=(const strtype &st) { // <-- change this!
        cout << "operator=(const strtype &)" << endl;
        str = st.str;
        return *this;
    }

    string get_str() const { return str; };
};
    
int main()
{
    strtype b = "example";
    cout << b.get_str() << endl;

    b = "something else";
    cout << b.get_str() << endl;

	return 0;
}