Do i need any 'new' to create properly objects c1 c2 c3?
No. "new" is called somewhere in read(), or in a method called by read(). Function return values don't need "new" because they are already instantiated before they are returned to the caller.
Is correct create the same object two times with different parameters, like here where there are two instances of c :
It is correct to reuse variable names, but I try to avoid it. It can cause confusion. It is easier to debug if variable names are not reused and the lifetime of variables are kept to a minimum.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.