The object that a reference is referring to is set when the reference is created and it's not possible to change it later. fig = tri ; This will assign tri to rect using Figure's copy assignment operator.
I'm surprised you aren't getting a compiler error/warning, a reference can only be initialized once. Once it has been set, it cannot be re-assigned, for lack of a better word.
No, this results in the error I stated in my first post, a reference can be initialized once and only once. If what you need to refer to changes then you use a pointer.
I almost did it again, just quickly looked at your code without reading it (thought the * was a &). Yes, you can do it like that and it will work.
The original problem you saw:
The problem you are seeing is 'splicing', you initialize the reference with an object of type Rectangle. Then you copy assign a Triangle to an already seated reference. When you call the virtual function getArea() it uses the vtable associated with the Rectangle, hence 10*10 = 100 and not your expected 50.