home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Microsoftware Monthly 19…2 Programming Power Tools
/
MASO9512.ISO
/
cpptutor
/
cpptutor.arj
/
EXAMPLES
/
EX0325.CPP
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1993-10-27
|
444 b
|
15 lines
// \EXAMPLES\ex0325.cpp
#include <iostream.h>
void main() {
const int size = 5; // define array size constant
int int_array[size]; // define array
for (int i = 0; i < size; i++){ // step through array
int_array[i] = i; // initialize array element
// print array element
cout << "int_array[" << i << "] is " << i << endl;
}
}