Line 19, 29, 31:
No need to calculate the discriminant again when you already have it.
Line 17, 19:
This will store the value of the root into a local variable, which will be automatically destroyed when it goes out of scope (at line 22).
I'm sure you were meant to store the value into s1 and s2 which you passed by reference. You can do this by removing your local declarations of s1 and s2.
This should fix your issue.