#include #include #include "MyString.h" using namespace std; int main() { char s[21]; // 引数付きコンストラクタによる初期化 // 自身の学籍番号にすること MyString s1("t123456A"); // 文字列の入力とセット MyString s2; cout << "文字列を入力してください(半角英数字20字以内): "; cin >> s; s2.setString(s); // コピーコンストラクタのテスト MyString s3 = s2; s1.printString(); s2.printString(); s3.printString(); return 0; }