c++ cZar
Tuesday, August 31, 2010
Arrays revealed (1 d mainly) in cpp
First, there are only one-dimensional arrays in C or C++. The number of elements is put between brackets:
Expand
|
Select
|
Wrap
|
Line Numbers
int array[5];
That is an array of 5 elements each of which is an int.
Expand
|
Select
|
Wrap
|
Line Numbers
int array[];
won't compile. You need to declare the number of elements.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment