Computer Science Canada Can anyone tell me how ARRAY Works? |
| Author: | jasonhan416 [ Sun Jan 11, 2009 10:37 pm ] |
| Post subject: | Can anyone tell me how ARRAY Works? |
My friend told me to use array for battleship but i dont know how array works.. turing help doens't help cause im too dumb to understand those >_> |
|
| Author: | TheGuardian001 [ Sun Jan 11, 2009 11:44 pm ] |
| Post subject: | Re: Can anyone tell me how ARRAY Works? |
an array is essentially a single variable that holds many values. these values can be integers, strings, reals, or any other type. a tutorial on arrays in general: http://compsci.ca/v3/viewtopic.php?t=14333 and more specific to any tile based game, including battleship (if you don't read the first one, this probably won't make sense) http://compsci.ca/v3/viewtopic.php?t=15927&highlight=array |
|
| Author: | syntax_error [ Mon Jan 12, 2009 1:38 am ] |
| Post subject: | RE:Can anyone tell me how ARRAY Works? |
Think of it as a table. 1D array has only rows or cols 2D has rows and cols and so on, now each array holds a certain type of data wither it be string int and so froth that data is being organized in an array giving it a specific location (rows, cols) that should be a very basic understanding for you, I hope do visit the links and read the tuts |
|