Let's say i create a class:I'm used to passing it like this for read-only functions:Code:class myClass { ... };
But i realised that some problems come up, so i figured this:Code:const myClass& aName
Could you tell me if there is a benefit of using this method, if it is correct?Code:const myClass& aName // for using its member variables const myClass aName // for using it directly



LinkBack URL
About LinkBacks



CornedBee