C++ Standard n3337
§ 5.17 Assignment and compound assignment operators
2) In simple assignment (=), the value of the expression replaces that
of the object referred to by the left operand.
(...)
6) When the left operand of an assignment operator denotes a reference
to T, the operation assigns to the object of type T denoted by the
reference.
§ 8.5.3 References
1) A variable declared to be a T& or T&&, that is, “reference to type
T” (8.3.2), shall be initialized by an object, or function, of type T
or by an object that can be converted into a T.(...)
2) A reference cannot be changed to refer to another object after
initialization. Note that initialization of a reference is treated
very differently from assignment to it. Argument passing (5.2.2) and
function value return (6.6.3) are initializations.
3) The initializer can be omitted for a reference only in a parameter
declaration (8.3.5), in the declaration of a function return type, in
the declaration of a class member within its class definition (9.2),
and where the extern specifier is explicitly used.
You cannot reinitialize a reference in C++ 1. You can assign different value to the object it refers to. This is one and the same object for that reference forever. And this is what you did in your example.
string s1("Nancy") // s1 Nancy
string s2("Clancy"); // s2 Clancy
string& rs = s1; // rs-> s1
cout<<rs<<endl; // ==cout s1
rs=s2; // == s1=s2
// s1 Clancy
// s2 Clancy
cout<<rs<<endl; // ==cout s1
cout<<s1<<endl;
That means s1's value is now changed and The original value of s1 is
lost forever??
Yes.
This is one of the things that differentiates references from pointers
then?
Yes. A pointer can be reinitialized and the reference cannot. This is the first difference pointed out here
What are the differences between a pointer variable and a reference variable in C++?
When to use references vs. pointers
Use references over pointers only when not reinitialising it?
Use them when you want always point to the same object. Use them as well if it is a member of a class and you want to preserve an invariant that valid object of that class always contains a reference to something. Reference member must always be initialized when class instance is constructed so in that way reference enforces you to preserve invariant.
1 As @James Kanze pointed out in the comments you cannot in fact reinitialize anything in C++ in proper technical meaning of this word. In most cases initialization involves constructor and that (ctor) is called only once, at the beginning of object's lifetime (initialization of a reference is special in this context as § 8.5.3/2 points out in that reference is initialized by passing an argument or returned value from function). After this happened there is only an assignment, i.e call to T& operator=(T const&)