Skip to main content

New answers tagged

0 votes

In C/C++, should I use 'const' in parameters and local variables when possible?

Don’t use “const” whenever you can, but whenever it is relevant. When you use a variable X then obviously it must have the correct value whenever you use it. Say you use it in line 100 and in line 200....
gnasher729's user avatar
  • 49.4k
-3 votes

In C/C++, should I use 'const' in parameters and local variables when possible?

Just like when you're doing network design with routers and switches and hubs. When you first set it up you turn security off. You then get all of your communications working perfectly in a closed, ...
user480956's user avatar

Top 50 recent answers are included