Greythorne (08-20-2018),Jorndel (02-12-2017)
Going to try and do my best on explaining arrays (Sorry if it's wrong):
The Basics
My compsci teacher always tells me this: imagine a shelf, x by y, in which you can put items (variables) in the slots.
For example: a 3x3 array would look like this:
Usually arrays work like regular grid boxes: you define them based on row and then column:Code:| | ___|___|___ | | | | ___|___|___ | | | |
For example, (3,2) would refer to the box on the third row and the second column, usually.
Important things to know:
-In coding, everything starts at 0; if you want to look at the first row and the first column, instead of doing (1,1) you would do (0,0).
Arrays can also be three dimensional, four dimensional, or if you really want, 10 dimensional.
WIP, will get back to it later, but I gotta go and do something and I'm lazy to do a google doc.
Last edited by ASERHaerheadrherherh; 02-08-2017 at 10:51 AM.
Greythorne (08-20-2018),Jorndel (02-12-2017)
I was looking for that because it's a quite hard to understand the arrays (and more for begginers like me). I have a question, does the arrays are the same on every programming language? (like C++ and C#). Thank you.
Zenitram (02-09-2017)
Just want to mention that there is different types of arrays.
You have the standard that is like: [0|1|2|3|4]
This stores just a single value on each position.
Then you have array-of-arrays (jagged array) that is more like two rows:
[1|2]
[1|2]
[1|2]
And then as explained I think you have matrix array:
[1|2|3]
[4|5|6]
[7|8|10]
Might be wrong on some parts since I've not used arrays that much besides a single value array
-But they all are handy for their own things ofc
Nice, But how do 'nested' arrays get stored in memory?
Click Here to visit the official MPGH wiki! Keep up with the latest news and information on games and MPGH! To check out pages dedicated to games, see the links below!
dd/mm/yyyy
Member - 31/01/2015
Premium - 12/09/2016
Call of Duty minion - 05/11/2016 - 05/11/2019
BattleOn minion - 28/02/2017 - 05/11/2019
Battlefield minion - 30/05/2017 - 05/11/2019
Other Semi-Popular First Person Shooter Hacks minion - 21/09/2017 - 17/09/2019
Publicist - 07/11/2017 - 02/08/2018
Cock Sucker - 01/12/2017 - Unknown
Minion+ - 06/03/2018 - 05/11/2019
Fortnite minion - 08/05/2018 - 05/11/2019
Head Publicist - 08/10/2018 - 10/01/2020
Developer Team - 26/10/2019 - 10/01/2020
Former Staff - 10/01/2020
Click Here to visit the official MPGH wiki! Keep up with the latest news and information on games and MPGH! To check out pages dedicated to games, see the links below!
dd/mm/yyyy
Member - 31/01/2015
Premium - 12/09/2016
Call of Duty minion - 05/11/2016 - 05/11/2019
BattleOn minion - 28/02/2017 - 05/11/2019
Battlefield minion - 30/05/2017 - 05/11/2019
Other Semi-Popular First Person Shooter Hacks minion - 21/09/2017 - 17/09/2019
Publicist - 07/11/2017 - 02/08/2018
Cock Sucker - 01/12/2017 - Unknown
Minion+ - 06/03/2018 - 05/11/2019
Fortnite minion - 08/05/2018 - 05/11/2019
Head Publicist - 08/10/2018 - 10/01/2020
Developer Team - 26/10/2019 - 10/01/2020
Former Staff - 10/01/2020
Cheers for the information. It will be useful for the newer coders.