//Observe the effects of constructors, copies, and concatenation.
#include<iostream>
#include<string>

using std::cout; using std::cin;
using std::string; using std::endl;
int main()
{

	string one, two="something";
	cout<<"one="<<one<<", two="<<two<<endl;
	one=" new";
	string three;
	three=two+one;// 'three' contains white space.
	cout<<"one="<<one<<", two="<<two<<", three="<<three<<endl;
	string four;
	cout<<"\nPlease enter a string: ";
	cin>>four;
	string five(four.size(),'*');
	cout<<"\nAs a password, "<<four<<" is "<<five<<"."<<endl;
	string six;
	six=two;//In contrast with Java, six is independent of two. 
	six+=" else";
	cout<<"six= "<<six<<". two still equals "<<two<<".";
	string::size_type six_length=six.size();
	cout<<"\nThe length of 'six' is "<<six_length<<".";
	return 0;
}
