Arrays C + +: Changing Array Dimensions 2 Become 1 Dimensions
For example an array of type int [], also has an array of type int automatically [][], the "array of arrays of type int". Array is called a two-dimensional array. Of course, with type int juag [][], we can make [][][], arraynya of type int which is a 3-dimensional array, and so on. There is no limit how many dimensions the array that we created, but rather something that is usually done to make the array more than 3 dimensions. Our discussion will be devoted to two-dimensional array. Type BaseType [] [] is usually pronounced "two-dimensional array of type base-type" or "array of array base-type".
How to connect the array?
easy course, each would be met with an array using a loop. Simply look at an example. In the picture below is how to create two-dimensional array into one dimensional arrays. The key was the statement that is in the green box.
Having lived keluaranya print. The full program can be downloaded here.
Jadilah yang pertama mengomentari
Post a Comment