//8.8.4
#include"iostream"
#include"string"
#include"cstring"
using namespace std;
struct stringy
{
char *str;
int ct;
};
void set(stringy &str,char *testing)
{
strcpy(testing,str.str);
str.ct = strlen(testing);
}
void show(const stringy &str,int n = 1)
{
if(n <= 1)
{
cout<<str.str<<endl;
}
else
for(int i = 0;i < n;i++)
{
cout<<str.str<<endl;
}
}
void show(const char *testing,int n = 1)
{
if(n <= 1)
{
cout<<testing<<endl;
}
else
for(int i = 0;i < n;i++)
{
cout<<testing<<endl;
}
}
int main()
{
stringy beany;
char testing[] = "Reality isn't what it used to be.";
set(beany,testing);
show(beany);
show(beany,2);
testing[0] = 'D';
testing[1] = 'u';
show(testing);
show(testing,3);
show("Done!");
system("pause");
return 0;
}