Topic: variable declaration
Author: cjp@image2.uea.ac.uk (C. Jeremy Pye)
Date: Thu, 2 Sep 1993 10:11:10 GMT Raw View
When declaring variables, which method is the most correct?
i.
for (int j=0;j<1000;j++)
for (int i=0;i<1000;i++) {
int k = i*j;
cout << k << endl;
}
ii.
int j,i,k;
for (j=0;j<1000;j++)
for (i=0;i<1000;i++) {
k = i*j;
cout << k << endl;
}
Please can you give me any points for either method, for or against.
Much obliged! J.
--
.........................................................
C. Jeremy Pye
NonLinear Image Processing Group Tel: +44 (603) 593220
School Of Information Systems Fax: +44 (603) 507720
UEA, Norwich NR4 7TJ, UK Email: cjp@sys.uea.ac.uk
Author: grumpy@cbnewse.cb.att.com (Paul J Lucas)
Date: 2 Sep 93 22:54:32 GMT Raw View