This isn't the ideal forum for a C++ question, but I'll take a crack at it. surv is there for other purposes than used in the qrisk calc interface. It only appears in the two functions as declarations and is not assigned in the code otherwise. I guess you'd need outcome data to need it.