Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Can anyone tell me how ARRAY Works?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
jasonhan416




PostPosted: 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 >_>
Sponsor
Sponsor
Sponsor
sponsor
TheGuardian001




PostPosted: 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
syntax_error




PostPosted: 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
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: