with get functions, use pointer or declare function as?
a simple rule I follow for accessors is for pods return by value for udts return by const reference
quote:Original post by ChaosEngine
a simple rule I follow for accessors is for pods return by value for udts return by const reference
sorry could you put that into simpler terms?
quote:Original post by johnnyBravoquote:Original post by ChaosEngine
a simple rule I follow for accessors is for pods return by value for udts return by const reference
sorry could you put that into simpler terms?
if return is not class thingo I no use & on type. If I define a clas thing I use squigily and sign thing
If you''re returning an objects, return by const reference. For plain old data types, return by value.
Could you define the terms "squigily" and "thingo"? Thank you.
std::string const& GetName();int GetID();
quote:Original post by ChaosEnginequote:Original post by johnnyBravoquote:Original post by ChaosEngine
a simple rule I follow for accessors is for pods return by value for udts return by const reference
sorry could you put that into simpler terms?
if return is not class thingo I no use & on type. If I define a clas thing I use squigily and sign thing
Could you define the terms "squigily" and "thingo"? Thank you.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement