IMHO that is more of a personal preference. It is required in C but not C++. Some people recommend declaring variables just before they are used in C++.note the separated blocks of lines and where variable declarations should be put
IMHO that is more of a personal preference. It is required in C but not C++. Some people recommend declaring variables just before they are used in C++.note the separated blocks of lines and where variable declarations should be put
you are right cyberfish, I often declare variables not at beginning too.
By the way, in that case these declarations stay well out of the loop
Last edited by carlorfeo; 02-07-2008 at 07:21 PM.