c++ values and reference type