4 ms·
As other said, it is not a good practice so inline all the code, I prefer well named variables, and I assume you can find examples in your code where you have a
by simion314 4y ago
As other said, it is not a good practice so inline all the code, I prefer well named variables, and I assume you can find examples in your code where you have a local variable that depends of a function parameter.
Funny enough I was correcting my son c++ homework yesterday, he had a complex if statement like
if (somefunction(m,n, y[j]) == m[j])
and I made him make a local variable to make it clear what is happening. then the code was easier to understand and debug because we culd print that local variable and see if is fine.
Btw, try not too respond that smug, you proved that you are an inexperienced coder and a shit person.
- vanderZwan 4y agoI'm not so sure about that one, despite clearly being in the company of people who feel attacked, I'm not the one attacking people here. I'm commenting on code practices, and baffled at other people's rage about the compiler demanding that you don't have unused variables, but I haven't attacked anyone.
- simion314 4y agoYou commented about my code quality, but I will assume you were in a rush and missunderstood that I was talking about work in progress stuff and debugging, so if that was teh case I apologize (if is not the case then you might understand in a few years)